The move is seen as a vital step in the process of giving Afghanistan full responsibility for its own security, but the US wants to keep control of the prison's maxium security inmates, many of whom are senior Taliban leaders.
Analysts say the US doesn't trust Afghanistan's ability to keep such inmates behind bars.
Correspondent: Michael Edwards
Speaker: Enayatullah Nazari, Afghanistan's acting Minister of Defence; Colonel Robert Tavadash, Commander of U.S forces at Bagram; Bill Roggio, Afghanistan expert.
MICHAEL EDWARDS: Bagram Prison has become a symbol of the US occupation of Afghanistan.
Set up inside an air force base north of Kabul, it has housed senior members of the Taliban and al Qaeda.
(sound of marching band)
But control of the prison has now transferred to Afghan authorities. The US handed over the keys to Afghanistan's acting minister of defence, Enayatullah Nazari, at a ceremony at Bagram.
ENAYATULLAH NAZARI (translation): Our Afghan security forces are well-trained and we are happy that today they are exercising their capability in taking the responsibility of prisoners independently and guarding the prisoners. We are taking the responsibility from foreign forces.
MICHAEL EDWARDS: Publicly, the US claims to have full confidence in the ability of Afghan forces to keep control of the prison.
Colonel Robert Tavadash is the Commander of US Forces at Bagram.
ROBERT TAVADASH: We transferred more than 3,000 Afghan detainees into your custody at an expedient rate, and ensured that those who threaten the partnership of Afghanistan and coalition forces would not return to the battlefield.
MICHAEL EDWARDS: But the US's actions speak louder than words. Just before the handover, the US told Afghan authorities that it would keep custody of 50 or so of the prison's toughest inmates - these mostly being senior insurgent leaders.
Bill Roggio is an expert on Afghanistan who edits the Long War Journal.
BILL ROGGIO: The Afghans have a terrible record when it comes to keeping some of the worst of the worst in their prisons, they've freed Guantanamo prisoners who they promised they would keep in custody, so I don't expect prisoners that are detained in Afghanistan during operations to remain in custody for very long.
Afghan officials are prone to either bribery or intimidation and they've cut numerous top level Taliban leaders, they've cut them loose in the past.
MICHAEL EDWARDS: The jail has been at the centre of numerous allegations of prisoner abuse, and Afghanistan's government says local control is a matter of national sovereignty.
To Bill Roggio, it's another problem that is unlikely to be solved ahead of the western withdrawal in 2014.
BILL ROGGIO: The case of the Bagram Prison, just like everything else in Afghanistan, it's not quite as rosy as the coalition and the Afghan government wants you to believe it is.
MICHAEL EDWARDS: The two countries are also locked in argument about what happens to insurgents captured from now on.