Perez, who is deemed a prospect for the future in Formula 1, has expressed his 'delight' in moving to the British-based team following reports that Hamilton is due to sign for Mercedes to replace Michael Schumacher.
"I'm thrilled and delighted to have become a Vodafone McLaren Mercedes driver," said Perez. "The McLaren name is one of the greatest in the history of Formula 1.
"For more than 40 years McLaren has been a team that every racing driver has aspired to drive for. I was brought up on the great stories of Ayrton Senna's many world championship triumphs for McLaren and I'm truly honoured that they've chosen me to partner Jenson from 2013 onwards."
McLaren team principal Martin Whitmarsh added: "On behalf of everyone at Vodafone McLaren Mercedes, I'm delighted to welcome Sergio on board. His performances throughout 2012 have convinced us that he's an extremely exciting prospect for the future.
"It was a string of giant-killing performances, a trio of podiums and a brilliant fastest lap in this year's Monaco Grand Prix that showed us that Sergio lacks nothing in terms of speed and commitment.
"Finally, it's entirely appropriate that I should take this opportunity to pass on our thanks to Lewis. He wrote a huge chapter of his life and career with us, and was, and always will be, a fine member of an exclusive club - the McLaren world champions' club."
Hamilton, who was out of contract in November, joined McLaren at the age of 13.