The former Manchester City striker scored his third goal in only his second game for the Rossoneri after Davide Astori was dismissed for a second booking. Victor Ibarbo had given the Sardinians the lead on the stroke of half time.
Cagliari hadn't beaten Milan since October 1998, but they stretch their unbeaten run to five games. Milan are yet to taste defeat in their six games of 2013.
The Sardinians had Radja Nainggolan and Danilo Avelar suspended, plus Nene was injured. Milan travelled without injured quartet Giampaolo Pazzini, Daniele Bonera, Kevin Constant and Nigel De Jong. Riccardo Montolivo sat out through suspension.
Constant safety issues plaguing the IS Arenas saw this game moved to Turin then back to Sardinia after an emergency appeal. The authorities then failed with a bid to have the game played behind closed doors.
Cagliari soaked up the pressure and hit the Rossoneri on the counter-attack midway through the first half. Marco Sau threaded through for Ibarbo, but the attacker lost his composure and ballooned over in the box.
Cagliari broke the deadlock with the last kick of the half. Philippe Mexes fouled Ibarbo, Daniele Conti whipped the free kick into the box and Ibarbo slipped inbetween Mexes to flick the ball past Christian Abbiati with his head.
Balotelli sent another setpiece into Agazzi's arms as the second half got underway. Five minutes in, Conti's shot from the edge of the area was a whisker away from finding the top corner after some good build up play from the home side.
Kevin-Prince Boateng, Bojan Krkic and Robinho were all brought on as the Rossoneri rolled the dice to spice up their stagnant attack. Milan got their chance when they were awarded a penalty in the last ten minutes. Agazzi saved a shot with his feet and as the ball was in the air, Astori wrapped his arms around Balotelli. Unlike last weekend, there was no doubt about this Milan penalty. Balotelli coolly stepped up and sent Agazzi the wrong way to draw the two teams level.
Milan were in the ascendency as they pushed for a winner. Balotelli's cushioned header was easily gathered by Agazzi. Super Mario then had an overhead kick chalked off due to the ball going out during the build-up. Agazzi parried Bojan's low effort and saved Balotelli's headed rebound, in spite of the forward being ruled offside.
Cagliari: Agazzi; Pisano, Astori, Rossettini, Murro; (Ariaudo 70) Dessena, Conti, Ekdal; Thiago Ribeiro, (Cossu 56) Sau, (Pinilla 76) Ibarbo
AC Milan: Abbiati; Abate, Zapata, Mexes, De Sciglio; Flamini, Ambrosini, (Bojan 65) Muntari; Niang, (Robinho 80) Balotelli, El Shaarawy (Boateng 61)
Goals: Ibarbo 45 (C) Balotelli pen 82 (M)