كتب : Hatem Maher
In-form midfielder Albert Riera needed two minutes to put the hosts ahead when he rose unmarked to head home a corner from the right.
Skipper Raul Tamudo doubled the lead six minutes after the interval when he collected a superb defense-splitting pass before brilliantly chipping the ball over Ilker Casillas.
Real defender Sergio Ramos pulled one back in stoppage time after connecting with a corner at the far post to volley home.
Barcelona-based club Espanyol held on the remaining few minutes to claim a precious victory.
Los Merengues are still in charge of the league table with 19 points, one ahead of Villarreal and Valencia, who come second and third respectively.
The victory keeps Espanyol in fifth place on 16 points.