A quick fire double early in second half from Zlatan Ibrahimovic then Samu Castillejo in the second half, built on the advantage given by Ragnar Klavan’s own goal 10 minutes in.
As a result, Milan secured sixth in the Serie A table and will begin their Europa League campaign in the second qualification round.
After a strong start from Cagliari, Milan quickly reasserted their control over the Isolani and a Hakan Calhanoglu cross was tipped just off Ibrahimovic’s head by Alessio Cragno.
That was just a warning though as Rafael Leao wriggled through he Cagliari defence and his effort came off the post and rebounded off Klavan and into the net.
Leao was looking dangerous on the left and he cut back for Castillejo on the edge of the area, but the Spaniard could only fire straight at Cragno.
Cragno was once again involved as he brilliantly denied Ibrahimovic at the far post, after the Swede got on the end of a Castillejo cross. Then moments later a Leao overhead kick crashed off the crossbar.
Milan didn’t have it all their own way as a Gaston Pereiro through ball found Artur Ionita and just as the Moldovan was about to round Gianluigi Donnarumma, Simon Kjaer got across to make the tackle.
Just before the break, Luca Ceppitelli had the ball hit his arm in a tussle with Ibrahimovic inside the penalty area. The Swede stepped up but his spot kick was saved.
After the break, Calhanoglu should have got the second after Ibrahimovic played a ball across the six yard box into the path of the Turk, but he could only bounce his shot off the turf and over the crossbar.
The second goal did eventually come and Ibrahimovic made up for his penalty miss as he was found unmarked just inside the box and fired into the far left corner.
It was three just two minutes later thanks to more good work from Ibrahimovic and Castillejo. First the Swede won the ball in a dangerous area allowing the Spaniard to play Giacomo Bonaventura in on the right, though he unselfishly returned the ball to his teammate for a nice turn and finish.
Bonaventura placed an effort wide as the Rossoneri saw out the remainder of the game in comfortable fashion, other than a late save from Donnarumma.