NATO headquarters in Kabul confirmed the deaths and said three other Resolute Support soldiers were wounded but it did not confirm the nationalities of the casualties, in accordance with its normal practice.
The police chief of Parwan province said three Afghan police had been wounded in the incident, which came just over a week after suicide attacks on Kandahar air base in southern Afghanistan and on a Spanish embassy guesthouse in Kabul.
The Taliban claimed responsibility for the attack.
Bagram, around 40 km (25 miles) to the north of the Afghan capital, Kabul, is one of the main bases for the 9,800 U.S. troops left in Afghanistan after international troops ended combat operations last year.
District Governor Abdul Shukur Qudusi said the suicide bomber detonated his explosives near a joint U.S.-Afghan patrol.
The attack underlined the Taliban’s ability to hit high-profile targets linked to the U.S.-backed government, which is aiming to reopening the peace process aimed at ending the 14-year insurgency.
On Monday, Taliban forces in Helmand closed in on the district of Sangin as they tightened their grip on the volatile southern province.