The Argentina international had not scored in three games prior to the Group H clash, but he put the Catalan giants ahead after half an hour at Camp Nou, scoring from the penalty spot after Neymar had been brought down by Ignazio Abate.
Sergio Busquets headed the home side further in front nine minutes later, when he got just enough contact on an inswinging set piece from Xavi to guide the ball home and register his second goal of the season.
Milan pulled one back a minute before the break courtesy of Gerard Pique’s own goal – with Kaka’s cross being diverted past Victor Valdes courtesy of a ricochet off the defender.
But Messi scored his second after 83 minutes, following good link-up play with Cesc Fabregas, as Barcelona moved five points clear at the top of their group and kept up their unbeaten home record.
Carles Puyol failed to make the bench for Barca, despite having featured twice since his return from a long-term knee injury, with Javier Mascherano and Pique starting in the centre of defence for the second successive game.
Massimiliano Allegri left striker Mario Balotelli on the bench, after a run of four games without a goal, while Kaka made his 90th Champions League appearance as the coach sought to avoid a fifth successive match without a win.
The home side made much of the early running, Xavi curling a free kick just wide after three minutes, before Messi was crowded out in the area as he attempted to fashion an opportunity.
Alexis then came close to nudging home Adriano’s cross after 21 minutes, but he was unable to connect at the far post.
Barca went ahead through Messi on the half-hour mark when he powered a penalty past Christian Abbiati.
Neymar was hauled down in the box by Abate as he attempted to reach a dinked Andres Iniesta throughball, with Messi keeping his cool to score his fifth goal of Barcelona’s European campaign.
Riccardo Montolivo almost levelled six minutes later, flashing an effort wide of Valdes’ right-hand post, but Barca continued to dominate and doubled their lead five minutes from the break.
Busquets glanced home a header from Xavi’s delivery to give Abbiati no chance.
Milan, though, pulled one back in the final minute of the half, when they were given a lifeline in somewhat fortuitous circumstances as Kaka’s attempted pull back clipped Pique and found its way past a wrong-footed Valdes.
Balotelli was introduced at the break and was quickly into the action, shaking off Mascherano and Adriano in the area before hitting a fierce shot that Valdes smothered.
The Italian then set up Kaka, who could only fire wide from close range, as Milan started the second half with purpose.
However, while they enjoyed plenty of possession, they failed to carve out clear-cut chances, as Barca’s defence stood firm, while Neymar and Sanchez reminded Milan of their threat on the counter.
Messi completed his double and wrapped up the match seven minutes from time, finishing neatly after a clever one-two with Fabregas to put Barca on the verge of the knockout phase.