The Portugal international converted a spot-kick in the 12th minute, doubled his personal tally in the dying seconds of the first half, before making it three late on.
Karim Benzema had opened the scoring for Madrid after being set up by James Rodriguez, who found the net himself between Ronaldo's first two goals to cap an impressive outing on the right wing.
Sunday's win matched the result of the sides' meeting in Barcelona in September and was a third victory in four games for Zinedine Zidane, whose triumphs as Madrid boss have been similarly convincing.
Madrid remain third in La Liga, but are now trailing second-placed city rivals Atletico by just one point, after Diego Simeone's side lost to league leaders Barcelona on Saturday.
Giedrius Arlauskis' goal had been under siege with Marcelo, Ronaldo and Isco all going close before Benzema struck in the seventh minute. James sent in a superb cross from the right and the Frenchman beat his marker to the ball before heading home for his 18th league goal of the season.
Madrid immediately started pushing for a second goal and Ronaldo doubled their lead from the spot in the 12th minute, after drawing a foul from Enzo Roco.
There was no stopping Zidane's men in the opening stages and James piled even more misery on Espanyol when his 16th-minute shot took a deflection off Papa Kouly Diop before finding the net.
Benzema could have made it four shortly after following an intelligent one-two with Isco, but he aimed just wide from eight yards out.
Espanyol got their first chance of note shortly before the half-time whistle after a quick break involving Mamadou Sylla and Salva Sevilla, but the latter's attempt was too weak to worry Keylor Navas.
Ronaldo was not to be denied in the dying seconds of the first half, however, dancing past three opponents before beating Arlauskis with a powerful left-footed shot.
Benzema should have made it five at the hour mark after some good work from Ronaldo down the right, but the striker's header lacked the power and accuracy to worry Arlauskis.
Ronaldo handed the former Lyon man another gilt-edged chance after a good combination with Marcelo down the left, but Benzema once more failed to get his attempt on target.
Madrid kept on pushing for more and Ronaldo nearly got his hat-trick when he lifted a free-kick over the wall, only to see his attempt clip the top of the net.
Ronaldo eventually made it 5-0 in the 82nd minute with his 19th Liga goal of the season, drawing level in the Pichichi standings with Luis Suarez, heading home from close range after a fine cross from Jese, before Espanyol debutant Oscar Duarte beat his own goalkeeper to cap a dominant outing for the hosts.
Key Opta stats:
- Cristiano Ronaldo is the first player to score eight goals against the same opponent in a La Liga season in this century. - Karim Benzema has scored more first goals than any other player in La Liga this season (7). - James Rodriguez has been involved in more goals than any other midfielder in La Liga this season (4 goals, 6 assists). - Madrid have won their last six league games at home, scoring an average of 5.5 goals per game. - Cristiano Ronaldo has scored 11 of Real Madrid's last 16 goals against Espanyol in La Liga.