Leonardo Bonucci had looked set to play the role of pantomime villain when he cancelled out Paulo Dybala's opener with a 28th-minute header against his old club.
But the end of the champions' 10 successive Serie A clean sheets was eventually softened by substitute Cuadrado, the winger nodding in Khedira's cross.
Khedira himself then completed the win with a clinical effort as Juve opened up a precious gap to second-placed Napoli, who drew 1-1 at Sassuolo earlier in the day.
Milan have not beaten Juve in Turin since 2011 – now head coach Gennaro Gattuso scoring the winner on that occasion – and they appeared destined for more pain from the moment Dybala got the scoring underway in the eighth minute.
Bonucci stunned his former faithful to give the visitors hope, the defender sprinting to the away supporters in celebration of what could have been a key goal in the context of the Rossoneri's Champions League hopes.
But Cuadrado and Khedira ensured they would they remain eight points behind rivals and fourth-place Inter Milan ahead of the midweek Derby della Madonnina, as the Bianconeri's unbeaten run extended to 25 matches in all competitions ahead of the Champions League quarter-final first-leg against Real Madrid in Turin.
The home fans' jeers for Bonucci began from the outset and added another layer to Milan's mental challenge, having lost on all six of their previous trips to Allianz Stadium.
Gianluigi Donnarumma received the first examination when he was forced to parry Gonzalo Higuain's stinging shot from outside the area.
The young goalkeeper failed to deliver in the next instance. Dybala received, swivelled and speared a shot into the bottom right corner all in one fluid motion, with Donnarumma perhaps surprised by an awkward late bounce.
Andre Silva should have supplied an immediate equaliser, but from close-range the forward wastefully headed Hakan Calhanoglu's cross around the post.
Instead, the stage was set for Bonucci. The Rossoneri skipper wedged himself between former defensive partners Andrea Barzagli and Giorgio Chiellini and emphatically headed home Calhanoglu's corner.
The home fans' jeers for Bonucci began from the outset and added another layer to Milan's mental challenge, having lost on all six of their previous trips to Allianz Stadium.
Gianluigi Donnarumma received the first examination when he was forced to parry Gonzalo Higuain's stinging shot from outside the area.
The young goalkeeper failed to deliver in the next instance. Dybala received, swivelled and speared a shot into the bottom right corner all in one fluid motion, with Donnarumma perhaps surprised by an awkward late bounce.
Andre Silva should have supplied an immediate equaliser, but from close-range the forward wastefully headed Hakan Calhanoglu's cross around the post.
Instead, the stage was set for Bonucci. The Rossoneri skipper wedged himself between former defensive partners Andrea Barzagli and Giorgio Chiellini and emphatically headed home Calhanoglu's corner.