Messi placed fifth in this week's Ballon d'Or voting, the first time he has been outside the top three since 2006, but offered a timely reminder of his enduring brilliance at RCDE Stadium.
The five-time Ballon d'Or winner was inspirational for Barca, opening the scoring with an unstoppable free-kick, then setting up Ousmane Dembele for a superb curling finish.
Dembele sent Luis Suarez clear for Barca's third before half-time with Messi adding his ninth free-kick goal in LaLiga in 2018 after the break to wrap up a completely dominant derby victory.
Barca led in the 17th minute thanks to the first moment of Messi magic in an astounding display.
The Barca captain, playing in this fixture for a joint-record 32nd time, beat Diego Lopez with a perfect free-kick from 25 yards that curled away from the goalkeeper's despairing dive.
Messi was leading Espanyol a merry dance and he set up Barca's second in the 26th minute, twisting and turning defenders on the edge of the box before slicing the back four open with a fine pass for Dembele, who cut inside and fired across Lopez into the top-right corner.
Suarez and Messi hit the post in quick succession as Espanyol completely failed to cope with Barca's attacking movement and sublime passing, a third goal arriving before the break.
Dembele was the creator this time with a superb pass to Suarez, who slipped his finish through the legs of Lopez from a tight angle.
To their credit Espanyol started the second half on top but they could do little to stop Messi, who beat Lopez again with another unbelievable free-kick in the 65th minute, this time from 30 yards.
Oscar Duarte saw a consolation goal ruled out for offside by VAR when he volleyed in Sergio Garcia's free-kick, with Espanyol at least able to restrict the damage to a four-goal defeat.
What does it mean? Barca move clear
Sevilla were on track to go top earlier in the day, but Valencia scored a 92nd-minute equaliser, although Atletico Madrid exerted some pressure by thumping Deportivo Alaves 3-0. Yet Barca's efforts to defend the title will take some stopping if they maintain this level of performance, having moved three points clear of the chasing pack.
Mesmerising Messi leads Barca charge
Barca's front three were all in fine form but Messi was the conductor at the heart of all their play. Pele said this week Messi has "one leg" and a strong preference for his left perhaps remains his only slight weakness, Lopez saving a relatively tame effort with his right in the second half. Coach Ernesto Valverde said it was "absurd" Messi finished fifth in the Ballon d'Or voting - he has a point. Messi had never before scored two free-kicks in a league game, but he keeps finding new records to set, having also become the first player in LaLiga history to score at least 10 goals in 13 consecutive seasons.
Four defeats in a row for Espanyol
Most sides would have crumbled in the face of Barca's stunning show, but Espanyol should have offered more fight in a derby meeting. They have not beaten Barcelona in 19 attempts in LaLiga now, while a fourth straight league loss means their strong start has faded badly of late.
- Dembele has been directly involved in eight goals in his last eight games for Barcelona in all competitions (three goals and five assists).
- Barcelona have scored the most goals from set-pieces in La Liga this season (11).
- Suarez has scored eight goals in nine appearances against Espanyol in La Liga – only against Real Madrid and Real Betis (nine) has he scored more often in the competition.
- No player has made more assists than Barcelona’s Lionel Messi in the Europe's top five leagues this season (eight, level with Chelsea's Eden Hazard and Milan's Suso).
- Espanyol have lost four consecutive La Liga games for the first time since May 2012.
- Messi and Cristiano Ronaldo have both scored two direct free-kick goals in the same La Liga game against the same goalkeeper: Diego Lopez (Espanyol & Villarreal).