Provincial governor media office following a statement said the militants were blown up after they planted improvised explosive device (IED) in Jani Khel district.
The statement further added that the militants were killed almost half an hour later after a roadside bomb blast killed one Afghan civilian and injured three others.
Local security officials quoted in the statement said that the first incident took place after a tractor struck with the roadside bomb six kilometers away from the place where the militants were blown by their own explosives.
Security officials also said that the first improvised explosive device (IED) which killed or injured local civilians, was also planted by the same militants.
No group including the Taliban militants has so far claimed responsibility behind the incident.
Taliban group frequently use improvised explosive (IED) as the weapon of their choice to target Afghan and coalition security forces, which normally lead to civilian casualties.
The group fighters are still using IEDs despite Taliban supreme leader Mullah Mohammad Omar earlier condemned the use of landmine which leads to civilian deaths.