nternational's 14th goal in his last nine games.
The points, and the title, were then wrapped up 10 minutes after half-time as Karim Benzema scored from close range as the first part of what could be a league and European Cup double.
If there were any nerves in the visitors' camp, then they were immediately soothed as Ronaldo opened the scoring after only two minutes with just his first and second touches of the game.
Malaga defender Luis Hernandez's heavy touch gifted the ball straight to Isco in the middle of the park, with the Spain playmaker then releasing Ronaldo with an inch-perfect through ball.
The Portuguese held his run brilliantly to stay onside, before rounding the onrushing Carlos Kameni and coolly firing into an empty net for his 40th goal of the season.
However, Malaga were not prepared to lie down and throw in the towel, especially former Barcelona forward Sandro Ramirez, who tried everything to get his side back on level terms before the break.
The closest the Spain U21 international came to scoring came in the 21st minute, only for Keylor Navas to produce a sensational one-handed stop to beat away the 21-year-old's curling free kick at his near post.
The visitors, who by this stage were aware that Barcelona were behind at home to Eibar, also came close to doubling their lead through that man Ronaldo 11 minutes before half-time.
But after Benzema's shot-cum-cross from the left somehow found its way through to the world player of the year at the back post, Kameni stood up tall to make an excellent close-range block as the title race remained alive, just.
That miss was soon forgotten, though, as Real doubled their lead after 55 minutes. Toni Kroos' right-wing corner was met firmly at the near post by captain Sergio Ramos, only for Kameni to make a sensational reaction stop.
Benzema, however, was there in the right place at the right time to fire home the rebound, the Frenchman's ninth career goal against Malaga.
At this stage, Barcelona were still surprisingly losing to Eibar and although the Catalans did recover to record a 4-2 win, Madrid did their part by seeing out the remainder of the match for a first top-flight title since 2012.