The death toll was not known but at least 40 people had been injured, said Mohibullah Habib, provincial health director in the city of Pul-e-Khumri.
A member of the Baghlan provincial council said clashes were ongoing and that it had sought immediate deployment from neighboring provinces.
“Clashes have not stopped,” said Assadullah Shahbaz.
The Taliban claimed responsibility for the attack.
“Several other Taliban fighters are presently clashing with the Afghan forces,” Taliban spokesman Zabihullah Mujahid said, Reuters reported.
Nasrat Rahimi, a spokesman at the Interior Ministry in Kabul, said several Taliban members had managed to penetrate the headquarters.
The Taliban have stepped up attacks on security installations, even as they hold direct talks with the US officials to end the war in Afghanistan.
The Taliban hold sway over more territory than at any point since their ouster at the hands of US-led troops following the Sept. 11, 2001, attacks on the United States.
Earlier this week the group rejected appeals made by Afghan President Ashraf Ghani and US special envoy for peace in Afghanistan, Zalmay Khalilzad to declare a ceasefire.
The Afghan-born US diplomat Khalilzad who is leading the sixth round of talks with the Taliban in Doha to pursue a deal that would see the withdrawal of foreign forces in return for Taliban security guarantees on Saturday said that America stands ready for “all sides” to lay down arms in the 17-year conflict.
“All sides agreeing to reduce violence is a necessary step toward achieving that outcome and the morally responsible choice to make. We stand ready,” Khalilzad tweeted.
Khalilzad’s comments came a day after Ghani said he was prepared to call an “immediate” and “permanent” ceasefire.
About 45,000 Afghan security forces have been killed since Ghani took office in September 2014.
The Taliban said they will not lay down their arms ahead of the holy month of Ramadan.
“A ceasefire will only get discussed once a deal about foreign force withdrawal gets finalised,” Suhail Shaheen, the Taliban’s political spokesman based in Doha told Reuters.
The Resolute Support Mission in Afghanistan consists of 17,000 troops, about half of them from the United States. A smaller number of US troops operate in Afghanistan under a counter-terrorism mission.