The explosion occurred in Shangla area of Khyber-Pakhtunkhwa province when Deputy Superintendent of Police Ayaz Khan was on a routine patrol.
Khan and his bodyguard sustained minor injuries and were taken to a nearby hospital.
Police cordoned off the area and launched a search operation. No group claimed responsibility for the attack.