The militants holed up inside an abandoned house in Karan Nagar, in the heart of Srinagar city, after their early morning bid to storm into the camp was foiled, triggering the gunfight.
The jawan, belonging to 49 Battalion of the Central Reserve Police Force (CRPF), suffered injuries in the gunfight and died hours later, they said.
Intermittent exchange of fire continued, there were also clashes between security forces and stone-pelting youths near the site, they said.
"The sentry at the camp noticed two suspicious persons at around 4.30 am, carrying backpacks and weapons. He challenged them and opened fire," a spokesman of the CRPF said.
The militants fled from the spot and took shelter in the abandoned house in residential area, the officials said.
The incident comes two days after Jaish-e-Mohammad militants attacked an Army camp in Sunjwan area of Jammu, killing six people including five soldiers.