Former United forward Ronaldo will earn an estimated £14.25 million a year at the Santiago Bernabéu, nearly twice as much as the club's world-record signing Gareth Bale.
Ronaldo, 28, spent six successful seasons with United but left Old Trafford for Madrid in 2009.
Ronaldo considered a return to United
Despite flirting with the prospect of a return the Portuguese pledged his loyalty to Real.
"I'm really happy here," Ronaldo beamed. "I'll be here five more years. I just want to win trophies for this club.
"I will be honest with you - everyone knows I was in Manchester for six years. Manchester is in the past. Now my club is Real Madrid. This is my home, my family is here and I'm really happy here.
Ronaldo signs new contract
"I respect all the clubs who ask about me. But they always know that my decision, that my only goal is to be here and to play at this club until, maybe, the end of my career.
"The future, nobody knows."
Ronaldo has won one Primera Liga title and the Copa del Rey in his four years in the Spanish capital, scoring an extraordinary 203 goals in 203 games for Los Blancos.
Along with Bale, Ronaldo netted in Madrid's absorbing 2-2 draw at Villarreal on Saturday night for his fourth goal in as many days after a hat-trick for the national team in Northern Ireland.
Ronaldo's £80 million transfer to Madrid four years ago arguably sparked the Premier League's steadfast regression, and English football's top flight has made a languorous start to the new campaign.