The shootout between the Pakistani national and the BSF erupted in village Rajatal near the Attari sector, a BSF official said.
A BSF patrol saw a Pakistani national suspiciously moving towards the Indian side and challenged him, he said.
The intruder declined to surrender and fired shots at the BSF personnel triggering a gunfight in which the Pakistani national was killed.
Eight kgs of heroin and an imported automatic pistol were recovered from the scene, the official said.