His 334th league win with the club tied with former Real Madrid goalkeeper Iker Casillas for most all-time in the competition. Messi also reached 41 goals, breaking the 40-goal mark for the 10th straight season.
He opened the scoring with a free kick in the 71st and sealed the victory from inside the area in the 89th, leaving Barcelona 10 points in front of Atletico Madrid, which routed fifth-placed Alaves 4-0 later on Saturday.
Messi scored six goals in his last three matches with Barcelona before the international break, when he didn't do much to help Argentina in a 3-1 loss to Venezuela in a friendly last week. He later complained about the constant criticism against him in his homeland, saying even his six-year-old son asked why he was being attacked.
Barcelona coach Ernesto Valverde defended Messi on Saturday. "Messi is the same player with Barcelona and with Argentina, and he would be the same if he played with Australia," Valverde said. "All I can say is that we are delighted with him."
There were no complaints from the crowd at Camp Nou Stadium after another great performance by Messi, who leads the league scoring list with 31, 13 more than his closest competitor, teammate Luis Suarez.
Espanyol defender Victor Sanchez had a chance to clear Messi's left-footed free kick shot at the goal line but ended up heading the ball into his own net. Messi's second goal came with an easy low shot after a pass from substitute Malcom.
"Everyone should enjoy Messi while he is still playing," Espanyol coach Joan "Rubi" Ferrer said. "He is unique and will be missed when he is done playing." Saturday's match attracted a lot of attention in China, with media there highlighting the first match of Chinese sensation Wu Lei against Messi.
Wu, who came off the bench in the 64th, has been the center of attention at Espanyol since being signed from Chinese club Shanghai SIPG in the winter transfer window. His jersey is the top-selling for Espanyol, which is owned by a Chinese businessman.
Wu is only the second Chinese to play in the Spanish league, and the first ever to score a goal. The other Chinese in Spain's first division was Zhang Chengdong, who played briefly for Rayo Vallecano in the 2015-16 season.
ATLETICO KEEPS PACE Atletico Madrid rebounded from two straight losses with a comfortable win over Alaves, opening a five-point gap to Real Madrid, which hosts last-placed Huesca on Sunday. Saul Niguez and Diego Costa scored early in the first half, and Alvaro Morata and Thomas Partey sealed the victory after halftime.
"We needed a win like this," Atletico coach Diego Simeone said. "We have to keep competing until the end." Costa, who scored with a nice shot from outside the area, had to be replaced at the break because of a muscle problem.
CELTA RALLIES Celta Vigo moved closer to escaping the relegation zone with a come-from-behind 3-2 home win over Villarreal. Striker Iago Aspas, who had been nursing injuries and hadn't started since December, scored the game winner by converting an 86th-minute penalty kick. The former Spain player also scored in the 50th to start the comeback after the hosts conceded twice in the first 15 minutes.
It was an emotional return for Aspas, who cried on the bench after being replaced in the final minutes. The win ended Celta's six-match winless streak and moved the club within one point of Villarreal, the first team outside the relegation zone after 29 matches.
GETAFE FALTERS Getafe lost a chance to strengthen its grip on fourth place after losing to southern Madrid rival Leganes 2-0. The result ended Getafe's seven-game winless streak. Leganes was 11th in the standings.
More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports
Tales Azzoni on Twitter: http://twitter.com/tazzoni