The Argentina forward was unable to reach the landmark in Wednesday's disappointing 0-0 draw at Malaga, but Granada could not keep him at bay as he chalked up his 400th and 401st strikes on a day that saw Neymar run riot at Camp Nou.
Luis Enrique's men were already well on their way to victory - courtesy of two goals from Neymar and an Ivan Rakitic strike - before the 27-year-old Messi took his La Liga goal tally to 248 in the second half, lifting him to within three of Telmo Zarra's record of 251.
Neymar went on to score a third after Messi turned provider and the latter completed the scoring in the closing stages as Barca continued their unbeaten start to life under Luis Enrique.
The coach will also take pleasure from a sixth successive Liga clean sheet, which ensures Barca have still to concede a goal in the Spanish top flight this season.
Luis Enrique called on his men to maximise Messi's influence following a tepid display in Malaga, but they were almost playing catch-up after only seven minutes.
Following wonderful wing play from Dimitri Foulquier, Youssef El Arabi produced an improvised finish after stumbling to the ground, only to see his effort come back off the crossbar.
That let-off seemed to spark Barca into life and Munir El Haddadi should have netted the opener a few moments later, the 19-year-old missing the target from four yards after receiving Jeremy Mathieu's cushioned volley across the face of goal.
The breakthrough eventually arrived in the 26th minute. Neymar latched on to Hector Yuste's dreadful pass across his own half and, after running at Jean-Sylvain Babin, the Brazilian saw his effort deflect off the defender and over the helpless Roberto.
Barca continued to enjoy the majority of possession and effectively secured three points in the lead up to half-time.
Rakitic grabbed the second goal with a glancing header from Messi's delightful cross, before Neymar pounced on a loose ball in the area and coolly slotted into the top-right corner of an empty net for number three.
Unsurprisingly, Barcelona's domination continued into the second half and Roberto had to work hard to prevent the hosts extending their lead.
There was little the goalkeeper could do in the 62nd minute, though, as Messi headed in Dani Alves' devilish cross and the Catalans' fifth soon followed.
After a free-flowing move, Messi turned supplier again as he picked out Neymar in the area and the tricky Brazilian showed admirable composure to stroke home.
A resounding win was completed in the 82nd minute as Messi robbed Jeison Murillo and lifted a clever finish over Roberto, doubling his tally for the day and taking him on to 248 La Liga goals.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.