Lewis Hamilton will leave Mercedes at the end of the 2024 season and join Formula One rivals Ferrari on a multi-year deal in 2025.
The 39-year-old only signed a new two-year deal with Mercedes last summer.
However, it is understood his contract contained a break clause after one year, which the Briton has chosen to activate.
Hamilton said he was “so proud” of the success he had achieved in 11 years with Mercedes.
The seven-time world champion added that Mercedes has been part of his life since he was 13 years old.
Hamilton’s switch to the Italian team is one of the biggest driver transfers Formula 1 has ever seen – if not the biggest.
He is set to partner Charles Leclerc in 2025, leaving Spaniard Carlos Sainz facing his last year as a Ferrari driver.
Hamilton joined Mercedes from McLaren for the 2013 season and secured six of his seven championships with the team.
He also won 82 of his record 103 races with the Silver Arrows.
Team Principal Toto Wolff said the pairing of Mercedes and Hamilton “has become the most successful the sport has seen”.
Hamilton’s dominant run with Mercedes has stalled in recent seasons, with the team unable to provide him with a car to challenge the power of Max Verstappen and Red Bull.
His last race win was at the Saudi Arabian Grand Prix in 2021 and a year later he finished sixth in the championship – two places lower than new team-mate George Russell.
Hamilton ended the 2023 campaign third in the standings, but he was 341 points behind first-placed Verstappen, who claimed his third consecutive drivers’ title.