The 27-year-old joins the world champions from Williams, taking over from the recently-retired Nico Rosberg.
Bottas's old team announced the long-awaited move as they also confirmed that Felipe Massa had come out of retirement to replace the departing Finn in their lineup.
"I'm delighted that Felipe has agreed to come out of retirement to be a part of our 2017 campaign," said Williams deputy chief Claire Williams.
"With Valtteri having a unique opportunity to join the current constructors' champions, we have been working hard to ensure that an agreement could be made with Mercedes to give Valtteri this fantastic opportunity.
"Valtteri has been part of the Williams family since 2010 and in that time has proved a huge talent, securing nine podium finishes. I would like to take this opportunity to thank him on behalf of the whole team, and wish him a successful season as he joins Mercedes."
Bottas will debut for Mercedes when testing commences at Barcelona next month, but is expected to be seen in Silver Arrows colours for the first time at Silverstone on February 23 when the world champions unveil their 2017 car, the W08.