Ronaldo, who is Real's all-time leading scorer with more than 370 goals and has won eight trophies including the Champions League twice, LaLiga and FIFA Club World Cup during his seven years at the club, will be 36 when his new contract expires.
Coach Zinedine Zidane said after Real's 3-0 win over Leganes on Sunday that he wants to see Ronaldo end his career at the club in the same way he did.
''I'm happy because he is a player who has to finish his career in Madrid. It is unique,'' Zidane said in comments reported by Marca.
''His dream is to finish here and why I'm glad he has renewed and will end it in this white shirt as I did.''
And now after Ronaldo signed his new deal alongside club president Florentino Perez, the Portugal international said he is aiming to remain at the club - even if he still expecting to sign another contract before he steps away from the game.
"It is a very important day," the three-time winner of the Ballon d'Or said at a press conference.
"I have said many times that I carry this club in my heart and it is part of me and a very special time in my life, I'm going to be here for another five years, it is not going to be my last contract, let it be known, but it is very special.
"I'm at the best club in the world...Everyone knows what my thoughts are, I want to continue being the best, I want to wear this shirt with pride.
"I'm sure I'm going to contribute the same over the next five years as I have in my time here, scoring goals and winning titles.
"I'm very happy. It is a dream come true to extend my contract here at the club. All I want to do is continue rewriting history here at this club.
"No-one knows what the future holds, of course I would like to end my career at this club, this is my penultimate contract, I want to be here for many years to come."