"She's got the grit, the integrity and commitment to the common good which are exactly what we need in Washington today," he said.
"She's exactly who I need, who this country needs, to help me fight to turn the same old Washington politics on its head."
Thanking Mr McCain, Mrs Palin said she would be honoured to serve next to him. She introduced her husband of 20 years and four of her five children. A son who did not appear on stage is in the US Army and will be deployed to Iraq next month.
Speaking of her time in office in Alaska, she said she had "fought corruption" and sought to serve the people.
She paid tribute to other American women in politics, including Hillary Clinton, Mr Obama's defeated Democratic rival.
"It was rightly noted in Denver last week that Hillary left 18 million cracks in the highest, hardest glass ceiling in America. But it turns out the women of America aren't finished yet and we can shatter that glass ceiling once and for all," she said.
Mrs Palin is the second female US vice-presidential candidate, with the first being Democrat Geraldine Ferraro in 1984.
Analysts say Mrs Palin may have been chosen by the McCain campaign as a tactic to win over those Democratic women voters who were disappointed by the defeat of Mrs Clinton by Mr Obama.
Mr Obama and his running mate, Joe Biden, congratulated Mrs Palin on her nomination and said she would add a "compelling new voice" to the general election campaign.
"Her selection is yet another encouraging sign that old barriers are falling in our politics," their joint statement said.
Sarah Palin now appears side by side with Mr McCain on his website
A spokesman for the Obama campaign had earlier suggested Mr McCain's choice was irresponsible, referring to Mrs Palin's former role as mayor of the small Alaskan town of Wasilla.
"Today, John McCain put the former mayor of a town of 9,000 with zero foreign policy experience a heartbeat away from the presidency," said spokesman Bill Burton.
President George W Bush welcomed Mrs Palin's nomination, describing her as a "proven reformer".
"Governor Palin's success is due to her dedication to principle and her roll-up-your-sleeves work ethic and serves as a wonderful example of the spirit of America," he said.
Mrs Palin is seen as a strong conservative, fiscally and socially.
She also opposes abortion and her baby son has Down's Syndrome.
Abortion has been a key issue cited by Republican voters who feel Mr McCain is not conservative enough.
Mrs Palin's electoral chances may be harmed by the fact that she was placed under investigation in Alaska by state lawmakers at the end of July.
She sacked a public safety commissioner and the allegation is that she sacked him because he had not fired a state trooper who is Mrs Palin's former brother-in-law, and who is in a custody battle with her sister.
She says she has "nothing to hide" and is "cool" about the investigation.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.