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".
Lucia Newman, Al Jazeera's correspondent in Dayton, said Palin was an interesting choice for McCain.
"One of the perceived weaknesses of John McCain is that he is too old and he is also seen as being too close to the Republican establishment.
"Palin balances out the ticket - she is young and a maverick and brings across some voters who would have supported Hillary Cinton [as the Democratic presidential candidate] and who are not yet convinced by Obama."
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."
Obama's campaign issued a statement condemning Palin as too inexperienced for the vice-presidency.
"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.
Mitt Romney, McCain's former rival for the Republican nomination, and independent senator Joe Lieberman, had been top contenders for the vice-presidential candidate position.
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.