The skirmish lasted several hours on Wednesday, after Indian troops surrounded a suspected separatist stronghold.
"Even after the encounter ended the army searched the village for more militants and their arms for the whole night," a police spokesman said, adding that the two men shot dead were suspected of belonging to Kashmir's Hizb ul-Mujahedin.
In another gunbattle with armed groups that oppose Indian rule of the region, a sub-inspector of India's Border Security Force (BSF) was killed on Wednesday in the central district of Budgam, police said.
"The encounter erupted when BSF troops were moving into a village to conduct a cordon-and-search operation," the spokesman said, adding that the troops later conducted house to house searches.
Indian police said armed men opened indiscriminate fire on houses belonging to village defence committee members killing two locals, including a member of the self-protection militia in the southern Udhampur district overnight.
Before leaving the village, the attackers set fire to two houses belonging to the defence committee members.
In the neighbouring village of Arnas, a suspected separatist shot dead another defence committee member overnight, police said.
Since they were formed in the mid 1990's village defence committees - predominantly comprised of ex-servicemen from the state's minority Hindu community - have played a paramilitary role for Delhi in trying to quell the separatist insurgency.
Elsewhere in Udhampur district, one BSF troop was killed and two others wounded Wednesday by a bomb planted on a path routinely taken by soldiers, a spokesman for the border force said in the winter capital Jammu.
More than 38,000 people have died in Kashmir since the eruption of an anti-Indian uprising in 1989. Separatists put the toll twice as high.