Now Palin is repaying the favor, putting her prestige on the line in an effort to help the four-term Arizona senator overcome his toughest re-election challenge ever.
The two campaigned together Friday for the first time since they lost the presidential race in 2008.
Watch McCain and Palin talk GOP strategy on "On the Record" with Greta Van Susteren at 10 p.m. ET Friday.
At the first of two rallies this weekend, Palin pumped up Tea Partiers, invoking the cause of the first Tea Party in 1773.
"Remember it was the Freedom Fighters and those who protested tyranny and big government," she said. "And that's what we're doing today."
"And when you think about that first Tea Party, shoot, some may claim that John was there, at the first Tea Party," she said with a laugh, poking fun at McCain's age. McCain, who is 73, grinned widely beside her.
After the rally, they were to hold a fundraiser at the same Phoenix hotel where McCain conceded the presidential election on Nov. 4, 2008.
Now McCain is fending off a primary challenge from former congressman and conservative talk-radio host J.D. Hayworth, who is a darling of the Tea Party, whose support McCain hopes Palin can undercut.
"She's very popular with the Republican Party and she's very popular with our supporters," McCain told Fox News.
Political experts say Palin could help McCain win over even the Republican party's most conservative members.
"I don't think most endorsements have much effect at all. But I think Palin in this specific race could make a difference," political analyst Tucker Carlson told Fox News, calling Palin the "de facto leader of the Tea Party Movement."
"She's the one person that the kind of voters who don't like McCain in Arizona might listen to," Carlson said. " She's the one person who might be able to convince them to support John McCain."
Since the 2008 election, Palin has shocked the political world by resigning her governorship and becoming a best-selling author, a hero of the Tea Party Movement and a strident critic of President Obama and Democrats in Congress.
McCain, who built his career on a reputation for being a maverick and working with Democrats on major issues such as reducing greenhouse gas emissions and restricting campaign donations, has made a notable shift to the right as he fights for his political life.
Hayworth is hoping to topple one of the Republican Party's best-known figures by reaching out to conservative activists. He has tried to define himself as "the consistent conservative" in contrast to the "maverick" McCain.
He says McCain is too moderate for Arizona Republicans and is trying to hang his past work with Democrats around his neck like an albatross.
Before Hayworth left his radio show to enter the race, he used the airwaves to attack McCain's congressional record, most notably his work with the late Sen. Edward M. Kennedy on a bill that would have created a pathway to citizenship for illegal immigrants.
And he points to a Facebook page, Sarah Palin Supporters for JD, as evidence that he has the edge on the Tea Party vote.
"I think that really tells us where a lot of Arizona conservatives are," Hayworth told Fox News. "They think the world of Gov. Palin, but fortunately, they're going to vote for me. So let me put it this way, I look forward to having Ms. Palin's support following the primary on August 24th."
But leaders of four of the largest Tea Party organizations in Arizona issued a joint press release earlier this month, pledging neutrality in the state's Republican primary.
Peter Mirijanian, former adviser to Bill Clinton and Al Gore, said he believes Palin could make a difference for McCain, but he added that the Hayworth campaign is responding just right to her endorsement.
"Which is Palin is coming to speak on behalf of John McCain because she feels obligated to do so because he put her on the ticket, but her heart is really with us," he told Fox News.
Palin has criticized McCain's presidential campaign since their loss, saying in her book "Going Rogue" that there was substantial tension between her advisers and McCain's. She said she was kept "bottled up" from reporters during the campaign and was prevented from delivering a concession speech on Election Night.
But Palin hasn't actually criticized McCain himself, and the senator has stood by his decision to choose her as his running mate, saying he was proud of the campaign and predicting she will be a "major player" in the Republican Party.
Carlson called their reunion "pretty striking."
"We've heard for the past year about this pretty dramatic rift," he said. "This is proof they are united, at least in this moment. It's kind of a big deal. It's unexpected. I don't think it's obvious Palin would be doing this."
FoxNews.com's Stephen Clark, Fox News' Anita Vogel and Lindsay Stewart and The Associated Press contributed to this report.