According to reports, the policemen were released after local tribal elders brokered talks with the Taliban militants.
The 24 policemen were among 27 people kidnapped after Taliban militants captured Yamgan district last week.
Local government officials said the 24 policemen were released on Sunday; however three of their commanders are still being kept by Taliban militants.
The officials further added that the policemen had surrendered to Taliban militants after they were trapped in Taliban siege.
Deputy provincial governor Gul Mohammad Bidar said Afghan national security forces seized the control of Yamgan district following a military operation on Friday.
Bidar said clashes have ended in Yamgan district and the area has been cleared from the militants.
In the meantime, local security officials are saying that around 200 to 300 Taliban militants have been deployed in and around Yamgan district.
The officials also added that Taliban militants have taken positions in parts of Jurm and Keran Wa Manjan districts.