The first half was a tentative and tight affair with few chances for either side, both of whom had rung the changes, resting several first choice regulars.
Clarence Seedorf lashed a dropping ball wide to El Shaarawy, who then beat Andrea Barzaglie with a clever touch only to fire his shot from a tight angle across the six-yard box. Juve didn’t create a decent chance until after the half-hour mark when Marcelo Estigarribia thrashed wide from 15 yards.
Emanuele Giaccherini hit a shot from outside the box that took a wicked deflection, but Milan goalkeeper Marco Amelia stretched out a hand to tip it over bar.
The second half was a much more lively affair thanks to the visitors taking an early lead. Former Milan forward Marco Borriello wriggled free in the box to get off a shot that Amelia could only push out and Caceres was quickest onto the loose ball to finish on 53 minutes.
Juve threatened to run away with it and another Milan old-boy Andrea Pirlo fizzed a shot wide of the upright. But the hosts started to come back into it and captain Massimo Ambrosini teed up El Shaarawy to fire home a crisp finish on 62 minutes.
Zlatan Ibrahimovic then had the ball in the net, but it was ruled out for a handball. Milan appeared the more likely to go ahead and Ibrahimovic had another chance that Giorgio Chiellini blocked with a dramatic full-length dive.
Juve went close when Amelia pushed out Mirko Vucinic’s shot only for Fabio Quagliarella to arrive too late to knock home the rebound. But seven minutes from time Giaccherini beat the offside trap to escape down the left flank and cross for Caceres, who took a touch and planted an unstoppable curler into the top corner that left Amelia rooted to the spot.