Palin, who was joined on stage by her husband and family, said she was honoured to be chosen as McCain’s deputy.
“As governor, I’ve stood up to the old politics as usual,” she said. “This is a moment when principle and political independence matter.”
The move could appeal to women voters who might have been disillusioned by Barack Obama’s decision to pick Joe Biden as his Democratic running-mate instead of Hillary Clinton, who won 18 million votes in her Democratic primary battle with Obama.
At 44, Palin is three years younger than Obama and, like McCain, she calls herself a “maverick”.
In-depth coverage of the US election
Lucia Newman, Al Jazeera’s correspondent in Dayton, said Palin was an interesting choice for McCain.
Sean Aday, a political scientist at George Washington University, told Al Jazeera McCain had made a risky choice.
“She’s actually pro-life, which helps McCain with his base. She has not been on the national stage. She comes from a very small state. She has never been in this situation.”
“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 Bill Burton, Obama’s campaign spokesman.
McCain is preparing to accept his party’s nomination for president at the Republican convention in St Paul, Minnesota, next week.
Tom Ridge, the former governor of Pennsylvania, had also been linked to the post.
Early on Friday, Tim Pawlenty, the conservative Minnesota governor, said it was “a fair assumption” he would not be joining McCain on the Republican ticket.
Obama, the Illinois senator, accepted the Democratic presidential nomination on Thursday, becoming the first African-American of a major US party to win it.
By announcing his vice-presidential pick on Friday, observers say McCain was hoping to divert attention from Obama, who attacked McCain in Thursday’s acceptance speech, accusing him of following the policies of George Bush, the incumbent president.