McFaul, a Stanford University professor who signed on as an unpaid adviser to Obama during his first presidential campaign, moved with him to Washington and served for three years on the National Security Council before taking up his first diplomatic post as ambassador to Russia.
McFaul said he was leaving after the Sochi Winter Olympics, which begin Friday and end on Feb. 23, to rejoin his family in California. His wife and two sons left Moscow in the summer.
The ambassador announced his departure in a blog post in English and Russian titled "It's time, my friend, it's time," a line by the 19th-century Russian poet Alexander Pushkin. As all Russians know, the poem continues: "My heart is seeking peace."
In his blog post, McFaul pointed to many successes in U.S.-Russian relations, including the signing of a new strategic arms treaty in 2010, cooperation on supplying the NATO-led military campaign in Afghanistan and negotiations with Iran.
But his arrival in the Russian capital in January 2012 coincided with a period of unusual political tension because of the mass street protests that had broken out against Vladimir Putin as he prepared to return for a third term as Russia's president.
McFaul, who has written extensively about democracy in Russia, immediately found himself in the Kremlin's cross hairs. In introducing the new U.S. ambassador, Channel One state television accused him of supporting the protest leaders and intending to help them seize power in a "revolution."
He was followed and harassed by camera crews from NTV, a channel loyal to the Kremlin.
"Was it strange for me that 50 people would show up to welcome me to a meeting with an NGO activist?" McFaul said in an interview with The Associated Press on Tuesday. "Not just NTV by the way. It was (the Kremlin youth group) Nashi, it was Cossacks with swords and hats. It was a whole circus."
McFaul reached out to Russians through social media networks, and now has 60,000 followers on Twitter and more than 13,000 "friends" on Facebook. He also gave frequent interviews to Russian publications and appeared on Russian TV and radio, usually speaking Russian.
But he said Tuesday that his biggest frustration after two years as ambassador is "our inability to dispel this myth that America and the Obama administration and me personally are seeking to foment revolution in Russia."
Putin has accused the U.S. State Department of instigating the protests and more generally seeking to weaken Russia. His anti-American rhetoric plays well among most Russians, who still harbor deep suspicions of U.S. intentions two decades after the end of the Cold War.
"I have tried so many different ways to battle this," McFaul said. "I see opinion poll data. I'm an academic — I take a particular interest in measuring results of our public diplomacy, and that piece is frustrating to me because it's just not our policy, it's not what we're trying to do here. So that's a failure I would say."
The Obama administration expressed its gratitude to McFaul for his five years of service.
"Moreover, Mike has been tireless in advocating for the universal values that America stands for around the world, reaching out to civil society, and recognizing the right of every voice to be heard," Deputy National Security Adviser Ben Rhodes said in a statement.
The administration has not yet nominated his replacement.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.