Karim Benzema got the only goal of the game as he headed home Alvaro Arbeloa's cross on 25 minutes.
Espanyol were indebted to goalkeeper Kiko Casilla for not having an even greater deficit to overcome next Tuesday at the Santiago Bernabeu as he made a string of fine saves to keep his side in the tie.
However, they should have snatched a draw on the night as Colombian striker Jhon Cordoba fired straight at Iker Casillas when played through on goal eight minutes from time.
Real boss Carlo Ancelotti named a strong side with Xabi Alonso the only first team regular to drop onto the bench.
And the Italian was rewarded with a commanding display from his side as they extended their unbeaten run in all competitions to 18 games.
Cristiano Ronaldo fired an early effort across goal before Espanyol passed up a huge chance to take the lead when Pizzi blasted over Sergio Garcia's neat cut-back from inside the area.
Thereafter it was one way traffic before the break as Casilla turned another low effort from Ronaldo onto the inside of the post.
Madrid did take the lead midway through the half as Gareth Bale flicked on Arbeloa's cross and Benzema powered home a header for his 14th goal of the season.
Casilla then saved from Benzema and a Bale free-kick, whilst Angel di Maria ballooned another clear opening well over the bar.
Espanyol posed more of a threat at the beginning of the second period as Garcia curled an effort inches wide of Casillas' right-hand post.
However, the visitors should have left Barcelona with a more substantial lead as Casilla denied Arbeloa twice from close range before Benzema forced the keeper into another smart save low to his left when he should have squared for the completely unmarked Ronaldo in the middle.
And Madrid were nearly made to pay as Casillas had to make a brave block from Cordoba before Marcelo cleared off the line following a goalmouth scramble in the latter stages to seal the victory and a sixth consecutive clean sheet for Los Blancos.