Both sides were without some key players as they played out an entertaining match.
Robinho put Milan ahead, before goals from Claudio Marchisio and Arturo Vidal gave the champions the edge.
Alessandro Matri put Juve 3-1 ahead before Robinho pulled one back with a penalty.