an hour with ten men after Alejandro Arribas was harshly sent-off after two handball incidents yesterday.
Barcelona remain 15 points ahead of Real Madrid in third position and move eleven ahead of Atletico Madrid, who play later on Sunday at Athletic Bilbao.
Messi now has 33 goals for the season, 12 more than Cristiano Ronaldo, who earlier on Sunday hit a hat-trick as Real Madrid beat Getafe 4-0.
David Villa started his first league game for Barca in more than two months and former Liverpool player Javier Mascherano filled in for the suspended Gerard Pique in the centre of defence.
Thiago Alcantara was the first to test the highly rated Andres Fernandez in the Osasuna goal on four minutes, but the keeper was quick to block a shot that the midfielder tried to lift over his head from close range.
It did not take long though for the breakthrough and on eleven minutes Messi opened the scoring and claimed another record.
A long through pass was cleared by Andres only as far as Xavi Hernandez, who found the Argentine in the area. There was still work to do but the four-time winner of the Ballon d'Or produced a beautiful dummy to take him past the keeper before tapping home.
Osasuna levelled the game on 24 minutes against the run of play when Marc Beltran crossed from the right and Loe hit a shot from outside the area.
However, the side from Pamplona were left with ten men only three minutes later when centre-half Arribas received a second yellow card after a shot struck his hand in the area. Messi coolly slotted away the penalty for his second and Pedro made it three before half-time after a generous pass from Dani Alves left him with a tap in from close range.
The Argentine got his hat-trick on 56 minutes when he started a move in midfield, exchanged passes with Villa, and took the ball around the keeper before slotting home. And a minute later and it was five and four for Messi as he finished off a swift Barca attack and Adriano pass from close range.
All Real's goals came in a much better second half performance in the derby against Getafe. It took until 52 minutes for Madrid to find a breakthrough when Sergio Ramos stabbed home from a corner.
Then Ronaldo hit three in ten minutes, his first on 62 minutes after a sweeping counter-attack saw Mesut Ozil play the Portuguese star into space on the left for a crisp finish. Three minutes later and from similar counter-attacking play he finished off a Gonzalo Higuain cross with a simple header and completed his hat-trick from the penalty spot on after Alberto Lopo had fouled Luka Modric.
Results: Real Madrid 4 (Ramos 53, Ronaldo 62, 65, 72pen) Getafe 0; Barcelona 5 (Messi 11, 28pen, 56, 58, Pedro 40) Osasuna 1 (Loe 24)