Talks between the two clubs and Ronaldo’s camp emerged early last week and have accelerated in recent days.
In a statement, the Spanish club said: “Real Madrid CF communicates that, in response to the will and request expressed by the player Cristiano Ronaldo, he has agreed to transfer to Juventus FC.
“Today, Real Madrid wants to express its gratitude to a player who has proved to be the best in the world and who has marked one of the brightest times in the history of our club and world football.
“Beyond the conquered titles, the trophies achieved and the triumphs achieved in the playing fields during these 9 years, Cristiano Ronaldo has been an example of dedication, work, responsibility, talent, and improvement.
“He has also become the top scorer in the history of Real Madrid with 451 goals in 438 games. In total 16 titles, including 4 European Cups, 3 of them consecutive and 4 in the last 5 seasons. On an individual basis, with the Real Madrid jersey he has won 4 Gold Balls, 2 The Best, and 3 Gold Boots, among many other awards.
“For Real Madrid, Cristiano Ronaldo will always be one of its great symbols and a unique reference for the next generations.
“Real Madrid will always be your home.”
Juventus are understood to have had a £105m offer for Ronaldo accepted by Real Madrid.
The Portugal international, who has only just returned from competing in the World Cup, will sign a four-year contract at the Turin club.
He will be paid a staggering £106m over the duration of his deal, which is being sponsored in part by car company FIAT.
Juve have been crunching the numbers trying to figure out how they can afford Ronaldo, who will be paid four times as much as their current highest-earner, Gonzalo Higuain.
They believe they can finance the deal without breaching UEFA’s financial fair play regulations.
However, player sales are expected.
Higuain could leave, with Chelsea supposedly interested in the striker, while Daniele Rugani is also supposedly on the Blues’ radar.
Paulo Dybala could be sold, with Liverpool linked to the Argentine.
Ronaldo’s arrival shatters the Italian transfer record set two years ago when Higuain joined from the Old Lady from Napoli in a £75m deal.
Higuain has at times struggled to live up to his price tag in Turin, with Juve’s sole aim to win the Champions League.
Ronaldo will arrive in Italy having claimed five Champions League titles in his career.
His signing is part of a drive-by club bosses at the Allianz Stadium to return the Serie A giants to the top of European football.