The incident occurred in Tambulak area of Mardan district when an attacker opened fire at a polio team who was administering vaccine in the area.
One policeman, deputed for the vaccinators' security, was injured in the incident.
Another police constable, who was also accompanying the team, resorted to retaliatory firing as a result of which the attacker was killed on the spot.
The attacker who was killed in the incident has been identified as Jehanzeb, a police officer said.
Pakistan is one of only three countries along with Afghanistan and Nigeria where the polio virus is still endemic.
Militant groups often attack polio teams as they see vaccination campaigns a cover for espionage. There are also long running rumours about polio drops causing infertility.