The deal, confirmed by the German company today, will have “one of the sport’s most successful ever collaborations” continue for a ninth consecutive season.
In what’s described as a “significant part” of the deal, the two parties want to build on their pledge to promote greater diversity and inclusion in motorsport by setting up a joint charitable foundation to support the cause.
“I'm excited to be heading into my ninth season with my Mercedes team-mates,” said Hamilton. “Our team has achieved incredible things together, and we look forward to building on our success even further while continuously looking to improve, both on and off the track.
“I'm equally determined to continue the journey we started to make motorsport more diverse for future generations, and I'm grateful that Mercedes has been extremely supportive of my call to address this issue.
"I'm proud to say we're taking that effort further this year by launching a foundation dedicated to diversity and inclusion in the sport. I'm inspired by all that we can build together and can't wait to get back on the track in March.”
Team principal and CEO Toto Wolff said: “The story of Mercedes and Lewis has written itself into the history books of our sport over the past eight seasons, and we're hungry to compete and add more chapters to it."
After his debut in the sport in 2007 with Mercedes F1 engine customer McLaren, Hamilton joined the Mercedes works team in 2013. Since then, he has won 95 grands prix and seven drivers’ championships, making him statistically the most successful driver in the sport's history.