The dead were Ainuddin, acting governor of Baraki Barak district and Azizur Rahman, intelligence director of the district.
Shapoor Ahmadzai said that the incident happened around 5:00p.m. on Saturday as the officials were heading to from the provincial capital Pul-i-Alam to the district.
He said that the explosion was triggered by a roadside bomb, adding the officials were the only casualties in it.
Taliban claimed responsibility for the attack.