At least 25 police and army personnel were killed in an apparent insider attack, Afghan officials said.
The attack took place in southern Zabul province, a Taliban stronghold, early yesterday.
Assadullah Kakar, a provincial council member, said the Taliban carried out the attack with the assistance of Afghan police and army personnel inside the base.
Ministry of Interior spokesman Tariq Arian said the attack was still under investigation.
No one took responsibility but Taliban spokesman Zabihullah Mujahed said he would look into the allegation.
It came as the US and Nato were beginning a staged withdrawal of troops in keeping with a peace deal with the Taliban.
The pullout is tied to promises by the Taliban to fight terrorism, including the so-called Islamic State affiliate, headquartered in eastern Afghanistan.
Washington has struggled to get Afghanistan's politicians to unite behind a single leader to start intra-Afghan negotiations.