The border guarding force said it has recovered the bodies of the two. An AK-47 assault rifle, a pistol and over two dozen bullet rounds were recovered.
The incident took place on the intervening night of September 19-20 in the Ajnala sector in Amritsar.
"When challenged by BSF troops, infiltrators fired on ambush line with automatic weapons. Taking cover, the fire was appropriately retaliated and infiltrators were neutralised near the border fence," a Border Security Force (BSF) spokesperson said.
A Pakistan SIM card, four kgs of heroin and Pakistani currency worth Rs 20,000 has been recovered from the two, it said.
"The area has been cordoned off and the search is on at the IB," the spokesperson added.