The deal led to the release of Sergeant Bowe Bergdahl, the American soldier held captive in Afghanistan for nearly five years, The New York Times reported.
In exchange, American authorities released five Taliban prisoners held at the US-run Guantanamo detention facility in Cuba, the report said.
The 28-year-old Bergdahl, who was captured by the Taliban in June 2009, was handed over to American Special Operations forces inside Afghanistan on Saturday by a group of 18 Taliban members, the Times said, citing US officials.
Officials said Bergdahl was in good condition. He was transferred to US-run Bagram Airbase near Kabul, where he will fly back home.
In a statement, President Obama hailed the Emir of Qatar for mediating the release.
Qatar will take the custody of the five Guantanamo prisoners, who will be subject to security restrictions, including a one-year travel ban.
The Times said talks on the exchange resumed in earnest about a week ago with Qatari officials who were acting as intermediaries for the Taliban.
Obama personally telephoned the soldier’s parents on Saturday, shortly after Sergeant Bergdahl was transferred to the American military, officials said.
The sergeant’s parents said in a statement: “We were so joyful and relieved when President Obama called us today to give us the news that Bowe is finally coming home! We cannot wait to wrap our arms around our only son.”
The Taliban on Wednesday condemned Obama’s decision to keep thousands of troops in Afghanistan beyond the 2014 withdrawal deadline.
"Now that Obama has announced that he will keep around 10,000 troops until the end of 2016 and continue their occupation, Afghanistan Islamic Emirate condemns it and considers it a violation of sovereignty, religion and human rights," said a statement, using the militants’ name for the country.
Obama confirmed Tuesday that the 32,000-strong US deployment in Afghanistan would be scaled back to around 9,800 by the start of 2015.
Those forces would be halved by the end of 2015 before eventually being reduced to a normal embassy presence with a security assistance component by the end of 2016, according to AFP.