Messi scored twice, including a 13th minute stunner that set the Catalans on their way, and was instrumental in the second goal from Pedro, before Bojan Krkic sealed a 5-1 aggregate win.
Barca's victory sent them through to the last eight for a third successive season and salvaged some honour for Spain after the elimination of La Liga sides Real Madrid and Sevilla.
"Only Manchester United have managed to get to the quarters the following season as reigning champions before and I want to congratulate my team for that," proud coach Pep Guardiola said at a news conference.
"Being among the eight best again and being able to compete with them fills us with excitement," he added.
The excitement during the match was supplied by the beguiling skill of Messi.
After collecting the ball just inside the visitors' half, he raced towards the retreating Stuttgart defence before unleashing a left-foot shot that fizzed past goalkeeper Jens Lehmann high into the net.
SMART WORK
The FIFA World Player of the Year turned creator nine minutes later. A superbly weighted pass sent Yaya Toure clear on the left and forward Pedro timed his run to perfection to sweep home the Ivory Coast midfielder's low cross.
More smart work from Messi set up Toure in the 55th but his low drive flew just wide of Lehmann's right-hand post.
Messi beat Lehmann again with a low strike from the edge of the area on the hour, his eighth goal in four matches in all competitions, to end Stuttgart's hopes.
As Barca asserted their dominance, a rampant Messi almost completed his hat-trick with a header in the 68th, well saved by Lehmann, before Krkic wrapped things up a minute after replacing Andres Iniesta.
Stuttgart coach Christian Gross said Real's elimination by Olympique Lyon last week had probably been an extra motivation for the Barca players.
"They pinned us back and we couldn't make any headway down the flanks," the Swiss said.
"They are the best team in the world and when they go ahead in front of their own fans it's very difficult," he added.
The draw for the quarter-finals is on Friday and on this evidence, Barcelona will again be the team to avoid.
Barca's Xavi to miss Stuttgart game with injury
La Liga: Barca beat Malaga 2-1, top table
Germany survive late Argentina onslaught
La Liga: Barca thrash Racing 4-0
Bundesliga: Leverkusen set record but drop points