Messi ended his three-game run without a goal as he smashed home the opener from the penalty spot after Neymar had been felled by Ignazio Abate. (Agencies)
Sergio Busquets then headed home a second, but Milan were handed a lifeline just before half-time when Gerard Piqueturned Kaka's cross into his own net.
However, Messi made the game safe seven minutes from the end when he dinked the ball home from Cesc Fabregas' pass.
Defeat still leaves Milan in second place in Group H, a point ahead of Ajax and two clear of Celtic after the Dutch champions beat the Scottish side 1-0 in the night's other match.
An eighth meeting between the sides in just the past three seasons meant there was a more subdued atmosphere than would normally be expected for a meeting between two of Europe's heavyweights.
However, Barca boss Gerardo Martino showed how intent he was on sewing up qualification as he named his strongest available side with the fit-again Adriano restored at left-back.
Milan boss Massimiliano Allegri, meanwhile, sprang a surprise by leaving Mario Balotelli on the bench with the former Real Madrid duo of Robinho and Kaka starting instead in attack.
Both Brazilians were largely isolated in the first half though as Barcelona controlled proceedings.
Xavi Hernandez pulled an early free-kick just wide before Neymar ought to have scored when played in by Messi, but he took a heavy touch and allowed Christian Abbiati to smother.
Messi ended his three-game run without a goal as he smashed home the opener from the penalty spot after Neymar had been felled by Ignazio Abate.