Nine-time holders Juventus came into the match in the unusual position of trailing in the Serie A title race, with first-placed Milan -- unbeaten in 27 league games -- leading them by 10 points in the table.
Milan struck back just ahead of the break on a counter-attack that Davide Calabria beat Juventus keeper Wojceich Szczesny
The duo of Dybala and Chiesa were back at it in the 62nd minute, with the former crossing for the latter to cut inside on his left foot and curl another spectacular shot past Donnarumma to restore Juventus' lead.
McKennie, who came on as a substitute, doubled the lead for Juventus as the half wore on, the U.S. international pouncing on a cutback cross and putting the ball in the back of the net with his first touch to make it 3-1.
The result sees Andrea Pirlo's Juventus move into fourth place in Serie A with 30 points through 15 matches.
Stefano Pioli's side remain top of the table on 37 points, one ahead of second-placed Inter Milan, who lost to Sampdoria earlier on Wednesday.
Milan coach Pioli was forced to play right back Calabria in midfield after Rade Krunic and Ante Rebic were ruled out on matchday following positive COVID-19 tests, adding to an absentee list including Sandro Tonali, Ismael Bennacer, Alexis Saelemaekers and Zlatan Ibrahimovic.
Juventus had issues of their own, with Juan Cuadrado and Alex Sandro in isolation and Alvaro Morata injured, but the selection problems did not impact the quality of an action-packed opening period.
"It's been a long time since we've lived through the ugly sensation of a defeat," Pioli told Sky Italia.
"I gave the players a pat on the back, they deserved it. They shouldn't have regrets after a game like this, they should keep their heads up."
Pirlo, who is looking to lead Juve to a 10th consecutive league title in his first season as a manager, was encouraged by what he saw from his players.
"We didn't look at the results of the other teams above us, we were focused on what we had to do," he said.
"It was important tonight above all to look for this spirit, the spirit of a team that wants to command, coming to a pitch this important against the team that is top of the league and playing our own game."