"The commander was leading fighting against Taliban and Daeah insurgents in Nazian district," Khogyani said. "The bomber was in front of his house and as soon as people from the village came together, he detonated himself."
The commander belonged to a volunteer pro-government militia movement known as Public Uprising.
A statement from the governor's office said 10 people had been killed, including three children, and another 23 wounded in the explosion.
Nangarhar province has been the main base for militants from Islamic State, generally known in Afghanistan as Daesh, where they have battled both government forces and the Taliban.
So far, no one has claimed responsibility for the attack.