Fierce gun battles raged for several hours late on Monday in the center of Sayyad district and outside the provincial capital, Sar-e-Pul, provincial council chief Mohammad Noor Rahmani said.
A high-ranking provincial official with an Afghan spy agency, a local police commander, and an army company commander were among the dead provincial council member Mohammad Asif Sadiqi told dpa news agency.
Taliban spokesman Qari Yousuf Ahmadi claimed responsibility for the attacks.
Sadiqi said at least 25 others were wounded in the attacks that began around 7pm local time (14.30 GMT) and continued for more than seven hours with Taliban fighters overrunning the posts.
The fighters first stormed two security posts in the district centre, Sadiqi added, before a reinforcement convoy that was sent to assist with repelling the Taliban was also ambushed by the armed group.
Taliban fighters have ramped up their attacks on Afghan security forces and government facilities in recent months, leaving troops thinly stretched throughout the country.
Last Tuesday, at least 12 Afghan security forces were killed in Taliban attacks in the northern Faryab and eastern Nangarhar provinces.
Peace efforts The Taliban has rejected Kabul's offer of talks this month in Saudi Arabia where the armed group, fighting to restore strict Islamic law in Afghanistan, will meet the United States officials to further peace efforts.
Representatives from the Taliban, the US, Saudi Arabia, United Arab Emirates (UAE), and Pakistan met in December in the UAE for talks to end the 17-year war in Afghanistan.
But the Taliban has refused to hold formal talks with the Western-backed Afghan government.
The armed group has insisted on first reaching an agreement with the US, which it sees as the main force in Afghanistan since US-led forces toppled the Taliban government in 2001.
Diplomatic efforts to resolve the conflict have intensified after Taliban representatives started meeting US envoy Zalmay Khalilzad earlier this year.
Officials from the warring sides have met at least three times to discuss the withdrawal of international forces and a ceasefire in 2019.
But the US has insisted that any final settlement must be led by the Afghans.