Officials said the incident occurred around midnight when the Border Security Force (BSF) troops deployed along the Line of Control fence in Keri sector of Rajouri detected some suspicious movement.
A heavy exchange of fire, including lobbing of grendades by the militants ensued for about 30 minutes and the guns then went silent from the other side, the BSF said.
A search was conducted early morning during which the BSF party recovered the body of the militant along with an AK-56 rifle, 16 loaded magazines, 267 live rounds, 89 other rounds of AK-series and a monocular night vision device from the Pakistan side.
A picture of the spot showed the slain militant wearing dark green camouflage uniform like that used by Indian Army personnel.
"The remaining terrorists took advantage of the undulating hilly ground and jungle and retreated to their side. The possible infiltration bid was foiled by alert troops," they added.