Sinner, 22, triumphed 7-5, 6-7 (5), 7-6 (2) in a match spanning more than three hours on Tuesday night and into Wednesday morning.
It was Sinner’s first win over Djokovic in four meetings, and it ended the Serbian player’s 19-match winning streak that stretched back to his five-set loss to Carlos Alcaraz in the Wimbledon final.
Sinner sealed the result when he hammered down a smash at the net to send the Turin arena into a frenzy.
The umpire had to tell the fans to be quiet several times as they fervently cheered their idol on and also booed Djokovic several times.
Djokovic, 36, who normally enjoys huge support in Italy, lapped up the boos and even encouraged the fans to up their hostility toward him.
Sinner, who beat Stefanos Tsitsipas 6-4, 6-4 in Sunday’s opener, is now on the verge of reaching Saturday’s semifinals. He next plays Holger Rune, who has one win after Tsitsipas retired early in their green group match and withdrew from the tournament.
Djokovic, who is looking to break a tie with Federer and capture a record seventh title at the tour finals, will play first alternate Hubert Hurkacz.