The MoD stated that Afghan Commandos launched a rescue operation in the Nahri Saraj district of Helmand on Wednesday night.
Twenty-seven people – including a former soldier – were freed from the prison, the MoD added.
“These prisoners were severely tortured by the Taliban, [who] violated all Islamic norms and principles, as well as rights (Human Rights),” a statement issued by the ministry read.
According to the statement, a Taliban militant was killed during the raid.
A number of weapons, ammunition, and radios were also seized by the Afghan soldiers, the statement said.
The Taliban has not commented on this regard.