In a tweet, Taliban spokesman Zabihullah Mujahid claimed responsibility and said 19 US soldiers had been killed and a number wounded.
NATO headquarters in Kabul confirmed there had been a vehicle-borne improvised explosive device attack near Bagram Air Base and said it was under investigation.
The police chief of Parwan province said three Afghan police had been wounded in the attack. He said he was not authorised to give details on foreign troop casualties.
Bagram, around 40 km (25 miles) to the north of the Afghan capital, Kabul, is one of the main bases for the 9,800 US troops left in Afghanistan after international troops ended combat operations last year.
The attack comes just over a week after suicide attacks on Kandahar air base in southern Afghanistan and on a Spanish embassy guesthouse in Kabul, underlining the Taliban’s ability to hit high-profile targets linked to the US-backed government.
Today, Taliban forces in Helmand closed in on the district of Sangin as they tightened their grip on the volatile southern province.