The hostages, who were both teachers at the American University in Kabul and held since 2016, were identified as American Kevin C. King, 63, and Australian Timothy J Weeks, 50, The New York Times reported.
King and Weeks were last seen in a 2017 hostage video looking disheveled and pleading with their governments to secure their release.
There was no immediate comment from the USA embassy in Afghanistan.
At the time, Ghani said the decision was made after consultations with the U.S. and was aimed at "facilitating face-to-face negotiations directly with the Taliban", who have, until now, refused to engage with what they call an illegitimate, US-backed "puppet" government.
"Soon after their release, they were flown to Doha and handed over to the political office in Qatar".
The three include Anas Haqqani, the younger brother of the Taliban's deputy, Sirajuddin Haqqani, who also heads the fearsome Haqqani network.
The Taliban group kidnapped the two American University lecturers from West of Kabul city in August of 2016.
"We spoke to them after they were provided with new clothes and shifted out of Bagram jail", the relative said, declining further identification due to the sensitivity of the issue.
The Taliban sources say the prisoners will be exchanged sometime Tuesday.
"The two professors are safely freed and are being taken care of now", said a senior Afghan official on condition of anonymity because he was not authorized to speak to the media.
The US officials reiterated their support for President Ghani's decision and committed to work closely together to respond to any possible Taliban violence in the event the group doesn't respond in good faith, the Palace said.
US Secretary of State Mike Pompeo and National Security Adviser Robert O'Brien made separate calls to Ghani on Monday to discuss the prisoners' release, the Afghan president's spokesman Sediq Sediqqi said.
The swap was meant to try to restart talks to end Afghanistan's 18-year war and allow for the eventual withdrawal of U.S. troops from Afghanistan.
The US had been close to an agreement in September with the Taliban but a fresh wave of violence in the Afghan capital that killed an American soldier brought talks and an impending deal to a grinding halt. It is believed to be based in Pakistan and is part of the Taliban in Afghanistan.
Tomas Berdych announces retirement at ATP Finals
I just need to have time for myself, for my family which, you know, gave me nearly everything from the time. Further highlighting on his future plans, Berdych said, "The plan is not to have any plans".
Mike Conley To Ja Morant: 'I Love Your Game'
The game featured Conley's return to Memphis, where he was presented with a tribute video during the first timeout of the game. He has embraced the role of a No. 2 option after being considered little more than a good floor spacer prior to this season.