Inter’s 4-0 win against Viktoria Plzen earlier on Wednesday had already sealed Barca’s fate, which led to a sombre mood from the first whistle at Camp Nou.
First-half goals from Sadio Mane and Eric Maxim Choupo-Moting were followed by a Benjamin Pavard strike with the last kick of the game.
Bayern were already through from Group C but confirmed themselves as group winners ahead of Inter with this win, with Barca dropping into the Europa League.
It took just 10 minutes for Bayern to strike after Serge Gnabry played a ball through to Mane, who outpaced Hector Bellerin before calmly dinking the ball past Marc-Andre ter Stegen.
The second also came thanks to an assured pass from Gnabry as Bayern countered and Choupo-Moting was slipped in on the right of the penalty area, firing his shot through the legs of Ter Stegen just after the half-hour mark.
The hosts thought they had a penalty just before half-time when referee Anthony Taylor pointed to the spot after Robert Lewandowski was felled by Matthijs de Ligt, but a VAR check revealed the Dutch centre-back got a touch on the ball before any contact was made with the former Bayern man.
Gnabry had the ball in the net with a terrific left-foot finish to Ter Stegen’s right 10 minutes into the second half, yet his effort was ruled out for offside.
A game that had the feeling of a dead rubber fizzled out, with Lewandowski and Co. never looking like getting back into the game before Gnabry had his third assist of the night as his volley from a corner found Pavard at the far post for a tap-in.