Piotr Zielinski scored the opening goal of the game midway through the second half, finishing on the rebound after Wojciech Szczesny pushed Lorenzo Insigne's shot back into the danger zone.
Napoli had lost four home league games in a row but climbed to 10th in the table after Insigne volleyed in a second, Maurizio Sarri's return to Stadio San Paolo ending in Juve's second league defeat of the season.
Cristiano Ronaldo hit a late reply but Juve missed the chance to move further ahead of nearest title rivals Inter and remain three points clear in top spot.
August's reverse fixture was a seven-goal thriller, Juve 2-0 ahead inside 20 minutes though needing Kalidou Koulibaly's late own goal to seal a 4-3 win, but this time half-time arrived with a single shot on target.
Arkadiusz Milik's tame header was comfortably saved by Szczesny with Napoli having had the edge in a strangely low-key opening 45 minutes.
Juve lost Miralem Pjanic to injury shortly after the break, the midfielder having been hurt in a tackle from Diego Demme before the break with Adrien Rabiot introduced in his place.
A late offside flag denied Ronaldo a 53rd-minute opener, the Portuguese then tricking his way past Elseid Hysaj to set up Gonzalo Higuain, whose low drive was stopped by Alex Meret.
Juve appeared in control but Napoli broke the deadlock on the counter in the 63rd minute when Szczesny parried Insigne's 25-yard drive and Zielinski was on hand to convert the rebound.
Napoli had penalty appeals rejected when Juan Cuadrado appeared to handle inside the box but the points were sealed by Insigne's strike that deflected in off Matthijs de Ligt in the closing stages.
Ronaldo gave Juve hope, extending his scoring streak to eight games, but when Higuain's overhead kick flew straight at Meret in the 94th minute, Napoli had secured a famous win.