Jose Mourinho fielded a weakend team with one eye on next Friday's King's Cup final against Atletico Madrid, Real's last chance for major silverware this season, giving the occasion a sense of anti-climax.
Cristian Stuani gave Espanyol the lead after 28 minutes, and although Gonzalo Higuain pulled one back for Real in the 58th it was not enough to stop Barca securing the league trophy.
Barcelona, who visit third-placed Atletico Madrid on Sunday, have 88 points with four games left to play. Real have 81 in second having played two more matches than their arch-rivals.
"We have to congratulate Barca. The league is a competition all about consistency," Real's Xabi Alonso told Spanish broadcaster Canal Plus.
"We didn't start the season well, and this meant we couldn't compete at the end. Now we have to focus on the Cup as it is a title we still have to compete for."
Despite the La Liga crown being at stake, Real started with the likes of Cristiano Ronaldo, Xabi Alonso and Karim Benzema on the bench and mid-table Espanyol, who have little left to play for this season, sniffed the chance for an upset.
The game took a turn for the worse for Real when Raphael Varane fell awkwardly as he made a tackle and went down clutching his right knee.
The promising young French defender had to be substituted after 19 minutes, and in the 28th Stuani pounced on a loose ball in the area at a corner to fire the hosts in front.
Espanyol were unlucky to have a second goal ruled out soon after, while Real offered little going forward until Higuain flicked a header inside the far post from Luka Modric's freekick just before the hour mark.
The equaliser came two minutes after Real's leading scorer Ronaldo had entered the fray and the visitors steadily increased the pressure on the Espanyol goal although they rarely looked like finding the winner.
Espanyol had midfielder Victor Sanchez sent off at the end for a dangerous tackle on Higuain, giving Ronaldo a final chance to grab a winner with a freekick, but his attempt was high and wide summing up Real's dismal night.
- Sports & Recreation
- Gonzalo Higuain
- Atletico Madrid
- Cristiano Ronaldo
- Xabi Alonso
- Jose Mourinho