The man was attempting to plant explosives on railway track near Grand Trunk Road, police sources said.
According to police a citizen had reported the motorway police about presence of a suspicious man at the place.
According to officials, heavy contingent of police reached the spot of the blast and cordoned off the area.
When the police approached the suspect, he exchanged fire with the officers before blowing himself up with explosives, an official said.
Police also recovered arms and a hand grenade from the terrorist.
A heavy contingent of police headed by the District Police Officer, reached the spot and cordoned off the area.
Police was conducting a search operation in the area.