The freed American is 45-year-old Peter Theo Curtis of Massachusetts, who wrote under the byline Theo Padnos.
White House national security adviser Susan Rice said Curtis is now safe outside of Syria. Secretary of State John Kerry said Curtis was held by Jabhat al-Nusra, also known as the Nusra Front, an al-Qaida-linked militant group fighting the government of Syrian President Bashar Assad.
Curtis was not believed to be among the hostages held by the Islamic State group that executed Foley. Islamic State was formally disavowed by al-Qaida earlier this year after being deemed too brutal.
President Barack Obama, who was wrapping up a vacation in Massachusetts, was briefed Sunday morning on Curtis' release.
"The president shares in the joy and relief that we all feel now that Theo is out of Syria and safe," said White House spokesman Eric Schultz. "But we continue to hold in our thoughts and prayers the Americans who remain in captivity in Syria, and we will continue to use all of the tools at our disposal to see that the remaining American hostages are freed."
A senior administration official said Curtis was released in the Golan Heights, where he was met by U.S. government personnel who were transporting him to Tel Aviv. The official was not authorized to speak by name and discussed the release on the condition of anonymity.
Qatar's Foreign Ministry confirmed late Sunday that the Gulf emirate succeeded in gaining Curtis' release. A government statement released by the official Qatar News Agency said he was kidnapped in Syria in 2012 and said Qatar "exerted relentless efforts to release the American journalist out of Qatar's belief in the principles of humanity and out of concern for the lives of individuals and their right to freedom and dignity." The agency said Curtis was handed over to United Nations representatives.
In a video obtained by The Associated Press and dated July 18, 2014, Curtis sits cross-legged on a floor with his hands bound, and appears to read from a sheet placed in front of him on the floor. Addressing the U.S. and European governments, he pleads for them to contact a named intermediary before it is too late.
"They have given me three days to live," he says as a man holding an assault rifle and dressed in camouflage stands next to him. "If you don't do anything, I'm finished. I'm dead. They will kill me. Three days. You have had 20 days, and you've done nothing. "
He does not specify any demands, only urges Western governments to make contact with the intermediary.
It was not known which, if any, of the captors' demands were met.
The energy-rich Gulf nation of Qatar, which is a leading supporter of the Syrian rebels fighting to oust President Bashar Assad, has been involved in mediating hostage releases in Syria over the past year.
In March, the Qataris helped negotiate the release of more than a dozen Greek Orthodox nuns held by the Nusra Front. Late last year, Qatar also helped broker a deal that saw nine Lebanese pilgrims held in Syria by rebels go free in exchange for the release of two Turkish pilots held hostage in Lebanon.
His family said they believe Curtis was captured in October 2012, shortly after crossing into Syria.
"My heart is full at the extraordinary, dedicated, incredible people, too many to name individually, who have become my friends and have tirelessly helped us over these many months," Curtis' mother, Nancy Curtis, said in a statement from the family. "Please know that we will be eternally grateful."
Curtis, under the Theo Padnos byline, has written for the New Republic and in 2011 wrote a book called "Undercover Muslim: A Journey Into Yemen," which studied the radicalization of disaffected youths.
Before leaving for Yemen in 2005 to study Islam, he worked in the Vermont prison system teaching teenage inmates. That experience resulted in the book "My Life Had Stood a Loaded Gun."
"He seems to be in good health," Curtis' cousin Viva Hardigg said in an interview. "We are deeply relieved and grateful for his return and the many people who have helped us secure his freedom. At the same time, we are thinking constantly of the other hostages who are still held and those working to help them be freed. We want to do everything we can to support their efforts."
In another video from June 30, 2014, a man with a beard and disheveled hair identifies himself as Peter Theo Curtis from Boston, and says he is being treated well.
"I have everything I need. Everything has been perfect - food, clothing, even friends now," he says. He appears to be reading from a script.
Curtis' release was first reported by Al Jazeera.
Kerry, a former senator from Massachusetts, voiced relief and gratitude for Curtis' release, "particularly after a week marked by unspeakable tragedy."
"Theo's mother, whom we've known from Massachusetts and with whom we've worked during this horrific period, simply refused to give up and has worked indefatigably to keep hope alive that this day could be a reality," Kerry said.
He added that over the past two years, Washington had "reached out to more than two dozen countries asking for urgent help from anyone who might have tools, influence or leverage to help secure Theo's release and the release of any Americans held hostage in Syria."
Foley was beheaded by Islamic State militants who released a video last week blaming his death on U.S. airstrikes against their fighters in Iraq. Foley's captors had demanded $132.5 million (100 million euros) from his parents and political concessions from Washington. Neither obliged, authorities say.
For al-Qaida and some other militant bands, ransoms paid to free kidnapped Europeans over the past decade have surpassed donations from private supporters as a source of funding, according to the United States and Britain.
The British government, like the U.S., adheres to a longstanding policy against paying ransoms to extremists. A senior Obama administration official said last week the Islamic State had made a "range of requests" from the U.S. for Foley's release, including changes in American policy and posture in the Mideast.