The militants, armed with a pistol, shot the soldiers from the Central Industrial Security Force while they were buying vegetables at the market, a senior police officer said.
"One of them died on the spot and the other is hospitalised with critical injuries," the city's police chief, Ashiq Bukhari, told AFP.
Tens of thousands of people, mostly civilians, have died in the fighting.
Kashmir has been divided between India and Pakistan by a heavily militarised Line of Control (LoC) since the two countries won independence from Britain in 1947.
Overall militant violence has declined in Kashmir since India and Pakistan began a peace process in 2004, and attacks in Srinagar itself are rare now.
But there have been intermittent shoot and run incidents involving police and suspected militants.
No militant group immediately claimed responsibility for Monday's attack.
In July suspected militants in Srinagar lobbed a grenade at a police vehicle carrying a prisoner who later died in a hospital.
Militants also killed eight soldiers during an ambush on the outskirts of Srinagar, the deadliest such attack in five years, marring a landmark visit by Prime Minister Manmohan Singh.
In a separate incident on Monday morning, India's army said it had killed a militant who was trying to infiltrate the forested Machil area, 140 kilometres northwest of Srinagar.
"He (the militant) fired on being challenged and was killed in the ensuing gunfight," Colonel Brijesh Pandey told AFP.
The militant's body was found in the heavily forested area two kilometres inside the LoC, the de facto border between India and Pakistan, along with an AK47 assault rifle, Pandey said.
COMMENTS (4)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
If a soldier is killed in Pakistan, the killers are called terrorists. If a soldier is killed in India, the killers are freedom fighters or militants.
@M Lasyaf, Get a job, dude!
Terrorists always attack cowardly. They cant face their match. Just like they killed in peshawar, naroibi and now in srinagar. Thats why we have such a big respect for our soldiers.
The guys killed are from industrial security force, not even regular soldiers. I hope they catch the culprits and put them to justice.
5 People have been killed in Shopian, Kashmir and it has been under curfew since 15 days. And the media slant towards that is 'absent'.
The occupation continues. 1,000,000 - 1 = 999,999 Soldiers Occupying Kashmir