Lewis Hamilton will join Mercedes from next season on a three-year contract.
The decision to leave McLaren after a 14-year association with the team has been described by one source close to Hamilton as "the toughest of his career".
In a statement Hamilton said: "It is now time for me to take on a fresh challenge and I am very excited to begin a new chapter racing for the Mercedes Formula One Team. Mercedes-Benz has such an incredible heritage in motorsport, along with a passion for winning, which I share."
Formula 1 racing driver Lewis Hamilton. Credit: David Davies/PA Wire/Press Association Images
He added: "Together, we can grow and rise to this new challenge. I believe that I can help steer the Silver Arrows to the top and achieve our joint ambitions of winning the world championships."
I was brought up on the great stories of Ayrton Senna's many world championship triumphs for McLaren, and I'm truly honoured they've chosen me to partner Jenson (Button) from 2013 onwards.
I've spent the 2012 season working very hard to demonstrate my potential, but I've always remained humble and focused.
While I'm still fully focused on doing my best for Sauber for the remainder of this season, I'm already massively looking forward to working with everyone at McLaren.
Mexican Sergio Perez will replace Lewis Hamilton at McLaren next season. McLaren said: "Sergio's new deal means that he will begin a driving partnership with 2009 world champion Jenson Button."