Gareth Bale returned from injury with a bang as the Welshman scored just 12 minutes after making a sensational comeback.
The 26-year-old had been out with a knee injury for over three months and this was his first appearance since getting back to fitness.
The win means Real Madrid temporarily move 4 points clear of FC Barcelona at the top of the table, while Espanyol have failed to win in their last 24 visits to the Santiago Bernabeu.
Zinedine Zidane made changes from the side which defeated Napoli in midweek, with Pepe, Nacho Fernandez, Mateo Kovacic and Alvaro Morata in the side and Gareth Bale on the subs’ bench after almost three months out through injury.
The game got off to a slow start as Espanyol looked organized and hard-working, although the visitors’ only threat came when Gerard Moreno was pulled up for a questionable offside decision.
Morata looked to take a rare starting opportunity and stabbed a half-chance wide after 13 minutes.
He then fired over in the 30th minute, although his effort was ruled out for offside and then he had the ball in then net after an error from Pablo Piatti, but once again the linesman’s flag frustrated him.
The striker finally got his goal in the 32nd minute when an inch-perfect Lucas Vazquez cross invited him to attack the ball and power a header past the helpless Diego Lopez.
Espanyol replaced Jose Antonio Reyes with Hernan Perez and the Paraguayan managed the visitor’s first shot on target. However, that wasn’t until the 60th minute as Madrid continued to dominate the game, all be it without creating clear chances other than a miss-timed Ronaldo header with 25 minutes remaining.
Gareth Bale returned to action after 88 days out with an ankle injury in the 70th minute, replacing Alvaro Morata as the game began to open up.
Vazquez volleyed into the net before Marcelo replaced the injured Nacho and then Bale celebrated his return with Madrid’s second of the game.
Espanyol were caught on the break and after Isco slipped the ball into the Welshman’s path, he held of Hernan’s challenge before firing across Diego Lopez to assure the win.