At least 83 people were freed from a Taliban prison in Qaisar district in Faryab province on Wednesday night, said Afghan force.
The operation was conducted by Afghan special force, said the Shaheen Corps spokesperson Mohammad Hanif Rezaee.
Taliban has not commented on it yet.
Taliban militants guarding the facility fled before the troops arrived. The civilians were shifted to an army camp for the identification process before being provided accommodation. They would be joining their families soon.
Taliban insurgents frequently detain civilians from across villages and highways on charges of spying for the government security forces.