Three other officers were killed in an attack in the country's south.
The suicide bombing, which struck at a market in the district of Khewa, also wounded 11 people — nine civilians and two members of the security forces, according to Attahullah Khogyani, the spokesman for the provincial governor.
He identified the slain commander as Mir Zaman; the other three officers were Zaman's bodyguards, AP reported.
No one immediately claimed responsibility for the attack, but both the Taliban and the Daesh terrorist group are active in eastern Afghanistan, especially in Nangarhar. Afghanistan has seen a recent spike in violence, with most attacks claimed by the local Daesh affiliate.
In May in the same district, a Daesh suicide bomber targeted the funeral of a pro-government militia commander and former warlord, killing 32 people and wounding 133. The dead in that attack included Abdullah Lala Jan, a provincial council member. His father, Noor Agha, a lawmaker, was wounded in the attack.
Also Tuesday, at least three policemen were killed and three were wounded in southern Zabul province when insurgents attacked their convoy in Shinkia district, authorities said, blaming the Taliban for the attack.
The Afghan military has also been launching attacks against the Taliban the Defense Ministry has so far refused to give details. The Taliban did not immediately comment on the attacks in Zabul.