News emerged on Thursday morning that the British driver will take the leap to Maranello ahead of the 2025 campaign.
Mercedes staff had the reports confirmed to them in an afternoon meeting before an official statement from the F1 team detailed how Hamilton had activated a release clause in his contract to move on.
The seven-time world champion, 39, only named his next destination as a "new challenge" before Ferrari officially announced his signing.
He stated: "I have had an amazing 11 years with this team and I'm so proud of what we have achieved together. Mercedes has been part of my life since I was 13 years old. It's a place where I have grown up, so making the decision to leave was one of the hardest decisions I have ever had to make.
"But the time is right for me to take this step and I'm excited to be taking on a new challenge. I will be forever grateful for the incredible support of my Mercedes family, especially Toto for his friendship and leadership and I want to finish on a high together.
"I am 100 per cent committed to delivering the best performance I can this season and making my last year with the Silver Arrows, one to remember."
Hamilton has signed a multi-year contract with Ferrari.
Mercedes boss Toto Wolff described Hamilton moving on ahead of Hamilton's 12th season with the team - six of which led to F1 world championships - as a "natural end".
He said: "In terms of a team-driver pairing, our relationship with Lewis has become the most successful the sport has seen, and that’s something we can look back on with pride; Lewis will always be an important part of Mercedes motorsport history.
"However, we knew our partnership would come to a natural end at some point, and that day has now come. We accept Lewis’s decision to seek a fresh challenge, and our opportunities for the future are exciting to contemplate.
"But for now, we still have one season to go, and we are focused on going racing to deliver a strong 2024."