According to the local government officials, the militants were blown up in Shindand district of Herat province while they were looking to plant an Improvised Explosive Device (IED).
The Taliban militants group has not commented regarding the report so far.
Taliban militants frequently use improvised explosive device (EID) as the weapon of their choice to target Afghan and coalition security forces.
IEDs are also a major contributor to civilian casualties in Afghanistan as the civilians are mostly targeted in roadsede bombings.
According to UN, Improvised Explosive Devices used by Anti-Government Elements, were the second leading cause of civilian casualties in 2014.
At least 1,463 civilian casualties were reported in IED attacks during the first six months of the year, up seven per cent from 2013 and the highest number of civilian casualties from this tactic recorded in a six month period since 2009, the UN said following a report.