The Rossoneri started brightly at the San Siro and took the lead after eight minutes through Robinho, who smashed home Balotelli's cross from close range at the far post.
Massimiliano Allegri's side went further ahead on 29 minutes through an unlikely source, with Philippe Mexes reacted quickest in the six-yard box to find the target after Balotelli's shot from distance had been spilled.
Milan looked to be cruising but Cagliari reduced the deficit just three minutes later in stunning fashion, as Marco Sau beat Mexes before curling a drive into the top corner from 20 yards.
Cagliari enjoyed their best spell of possession just before the break but were unable to take advantage and paid the price after the interval.
After threatening throughout, it was Balotelli who put the three points beyond doubt, lashing into the top corner after Ignazio Abate's cross had caused chaos inside the Cagliari penalty area.
Alessandro Matri came on for his Milan debut in the closing stages, while Sau missed a sitter at the other end as Allegri's side held firm to earn their maiden win of the campaign.