An Indian military spokesman said on Wednesday that the two army personnel were killed during an operation to intercept Pakistani infiltrators who were trying to sneak into India through the heavily militarized de facto border in the disputed Himalayan region of Kashmir.
The search operation had been launched following information about the movement of suspected militants, the official said.
India regularly accuses Pakistan of arming and training militants and allowing them across the restive frontier in an attempt to launch attacks. Pakistan strongly denies the allegation.
In recent years, southern Kashmir has seen intense fighting between Indian forces and armed Kashmiri fighters, who are demanding independence for the Himalayan region.
The conflict has left tens of thousands dead, mostly civilians.
6 soldiers reportedly killed in heavy border fire exchange in Kashmir Troops from India and Pakistan exchange heavy fire and mortar shelling along the line that divides Kashmir between the two countries, with a total of six soldiers reportedly killed from both sides.
Kashmir has been split between India and Pakistan since their partition in 1947. Both countries claim all of Kashmir and have fought three wars over the territory.
The two nuclear-armed neighbors have accused each other of violating the 2003 ceasefire agreement over 3,000 times to date this year.
India recently scrapped the semi-autonomy of its part of Kashmir, sparking a new wave of tensions over the region.