Messi misses penalty in stormy stalemate
Gonzalo Higuain opened the scoring against Malaga and Ronaldo, the world's most expensive player, rattled in three more before the break to take Real's goal tally to 25 from their last six games in all competitions.
Barcelona were denied by an inspired performance from goalkeeper Javi Varas who crowned his display with a stoppage-time penalty save from Lionel Messi as his side finished with nine men at the Nou Camp.
Real climbed to 19 points from eight games, one ahead of Barca. Unbeaten Sevilla are fourth with 16 points and big-spending Malaga are sixth with 13.
"Our first half was fantastic and that's where we won the game," Ronaldo told reporters.
"I haven't taken the match ball because I don't have space for them all," he added, after his third three-goal haul this season.
Sporting Gijon logged their first win of the season with a 2-0 home victory over promoted Granada, first-half goals from David Barral and Andre Castro dragging them off the foot of the standings and easing the pressure on coach Manuel Preciado.
The Asturians pushed north-coast rivals Racing Santander down to 20th on goal difference after Hector Cuper's winless side suffered a 1-0 home defeat to Espanyol.
Both Malaga and Real had penalty appeals waved away in a pulsating start at the Rosaleda, but the hosts were unable to stay the pace as Jose Mourinho's side ripped into them.
Higuain rounded the keeper to score after a clever pass behind the defence from his Argentina team-mate Angel di Maria.
Di Maria also laid on the second, his dipping cross from the right being side-footed home by Ronaldo and the knockout blow came when Malaga's defence parted for Ronaldo to fire in from outside the area just five minutes later.
The Portuguese wrapped up his hat-trick with a back-heel volley after a corner was headed back into the danger area in the 37th minute.
Malaga restored some pride with a battling second-half display, twice hitting the woodwork, but the damage had been done.
Sevilla goalkeeper Varas pulled off a string of impressive saves against Barca and when he was eventually beaten in the second half Andres Iniesta´s lob bounced on the crossbar.
Iniesta was brought down for a disputed penalty at the end and Sevilla striker Frederic Kanoute was sent off, after first kicking the ball off the penalty spot, and then tussling with Cesc Fabregas as the visitors disputed the decision.
Varas saved Messi's spot-kick and Sevilla defender Fernando Navarro was also sent off in the tense last seconds as he brought down Pedro on the edge of the area.
"I think we played a good game, but goalkeepers also play and we have to congratulate Varas for a great performnace today," Barca coach Pep Guardiola said.