• The 39-year-old won 82 of his record 103 races with Mercedes, who won eight consecutive constructors' titles from 2014 to 2021.
• Lewis Hamilton breaks silence on his move from Mercedes to Ferrari
Lewis Hamilton says he is "100% committed to the job" he needs to do at Mercedes this year before joining Ferrari in 2025.
The Briton joined Mercedes for the 2013 season and secured six of his seven world titles with the team.
Hamilton signed a two-year deal with Mercedes last summer but it is understood he chose to activate a break clause to switch to Ferrari.
"It's been a crazy few days filled with a whole range of emotions," he said.
In his first public comments since the move was announced, Hamilton added: "The time has come for me to start a new chapter in my life and I will be joining Scuderia Ferrari in 2025.
"I feel incredibly fortunate, after achieving things with Mercedes that I could only have dreamed of as a kid, that I now have the chance to fulfil another childhood dream. Driving in Ferrari red."
The 39-year-old won 82 of his record 103 races with Mercedes, who won eight consecutive constructors' titles from 2014 to 2021.
However, Hamilton has not won a race since the Saudi Arabian Grand Prix in 2021, which preceded that season's controversial title-decider in Abu Dhabi where the race director's failure to follow the rules correctly meant he missed out on a record eighth world title.
He finished sixth in the drivers' standings in 2022 and was third last season as Mercedes were usurped by Red Bull as Formula 1's dominant team.
"The time is right to make a change and take on a new challenge," said Hamilton in a social media post.
"I still remember the feeling of taking a leap of faith into the unknown when I first joined Mercedes in 2013. I know some people didn't understand it at the time but I was right to make the move then and it's the feeling I have again now.
"I'm excited to see what I can bring to this new opportunity and what we can do together.
"However, right now, I'm not thinking about 2025. My focus is on the upcoming season and getting back out on track with Mercedes.
"I am more driven than ever, I am fitter and more focussed than than ever and I want to help Mercedes win once again.
"I am 100% committed to the job I need to do and determined to end my partnership with the team on a high."
'Hardest decision I've ever had to make'
Hamilton told Mercedes team principal Toto Wolff of his decision to leave the team and join Ferrari over a planned breakfast at the Austrian's home on Wednesday.
Wolff said it came as a "surprise" but that he did not "hold a grudge" against his friend and did not attempt to change his mind.
Hamilton thanked Wolff in his message and also paid special mention to Niki Lauda, who died in 2019.
Lauda, a three-time Formula 1 world champion, was the non-executive chairman of the Mercedes team and was close to Hamilton, having been instrumental in persuading him to join in 2013.
"This decision has been the hardest I've ever had to make," added Hamilton.
"I'm incredibly proud of all that we've achieved together and I'm very grateful for the hard work and dedication of everyone I have worked with over the years and of course Toto, for his friendship, guidance and leadership.
"Together we have won titles, broken records and become the most successful driver-team partnership in F1 history. And, of course, I cannot forget Niki [Lauda] who was a huge supporter and who I still miss everyday."