Barca will face Bayern Munich in the last eight games after the German champions claim an aggregate 7-1 victory over Chelsea.
With the series level at 1-1 from the first leg in Napoli, Barcelona got off to a perfect start as Clement Lenglet returned home to a corner from Ivan Rakitic in the 10th minute.
Messi increased the lead in the 23rd with an outrageous goal, even by his standards, slaloming through several defenders after cutting from the right before pressing his shot at home.
Messi also played a big role in Barca’s third, being hacked by Kalidou Koulibaly, the penalty awarded after a VAR check.
Luis Suarez stepped in to take the penalty and give the home side a 3-0 lead.
Napoli rekindled their hopes when Dries Mertens, who had come close early in the game, suffered a foul from Rakitic in the penalty area.
Lorenzo Insigne converted the kick but despite some pressure from the visitors in the second half with Arkadiusz Milik’s header with 10 minutes remaining ruled out, there were no further goals as the team local defended their lead quite comfortably.
The result will be a relief for Barca’s under pressure coach Quique Setien.
His side had entered the game with growls of annoyance, with Messi himself describing the team as “weak” after a loss to Osasuna in the penultimate game of the season.
As rivals Real Madrid withdrew after the resumption to win La Liga, the Champions League represents the last silver chance for the Catalan giants this season amid new rumors about Messi’s future if the campaign ends by a failure.
Bayern beat Chelsea
Meanwhile, in Saturday’s other game, Bayern Munich claimed a 4-1 victory over Chelsea in the Allianz Arena with Robert Lewandowski scoring twice.
The Polish star made 53 overall for the season and contributed two more goals as Bayern, leading 3-0 in the first leg in February, advanced to the quarter-finals in style.
Lewandowski was knocked down by Willy Caballero in Chelsea’s goal early in the first half, scoring from the penalty spot before setting up the second for Ivan Perisic.
Tammy Abraham pulled one off for Chelsea with his 18th of the season just before halftime, but it only proved temporary relief for Frank Lampard’s men as new goals from Corentin Tolisso and deadly Lewandowski were settling a unilateral matter.