The civilians were arrested a few days before in Adraskan district by insurgents and had been transferred to an unknown location.
However, Herat security officials say the civilians were freed during military operations under the name of “Azm” on Tuesday.
17 villages of Adraskan district have also cleared of insurgents during the operations, officials added.
A police officer and a militant were killed and two other militants wounded in a shootout occurred between the two sides.
The anti-government armed militants are yet to comment on the report.