The landmines were found in a Taliban arms depot in Herat's Shindand district, according to the Pajhwok news agency.
The killed militants were experts in making and planting explosive devices, the agency reported.
Afghanistan has long been suffering from an unstable political, social and security situation due to simmering Taliban insurgency. The violence is exacerbated by the activities of various terrorist groups, including Daesh* terror group, outlawed in Russia. In August, the Taliban rejected Afghan President Ashraf Ghani's offer for a three-month ceasefire.
*Daesh (also known as ISIS/ISIL/IS) is a terrorist group banned in Russia.