Five policemen, including the chief of Aubi district, and five soldiers died after Taliban fighters attacked a convoy, local officials said.
Two Taliban leaders also died and 25 others were arrested, officials added.
Afghan police and troops are playing an increasing role in national security as Nato troops prepare to leave in 2014.
The attack took place in the Genewa area between Aubi and Chesht Sharif districts late on Monday, a spokesman for the provincial governor's office told the Afghan Islamic Press (AIP).
The Taliban has so far not commented.
Correspondents say casualties among Afghan security forces are rising as they take over during the transition process.
Herat has experienced sporadic outbreaks of violence although militant attacks have been concentrated mainly in the south and east of Afghanistan.
Nato handed security control of the city of Herat to Afghan forces in July 2011.