Two goals in the first nine minutes ensured a 2-1 win for Napoli in an enthralling Serie A clash on Saturday.
A sublime Lorenzo Insigne strike and a clever finish from Jose Callejon were enough to give Maurizio Sarri's side all three points, despite Juraj Kucka's finish just before half-time.
Napoli went into the game with only one defeat in 11 league matches against Milan and struck twice before the 10-minute mark thanks to two brilliant moves, with Dries Mertens at the heart of both.
Mertens wasted a good chance for a third before Kucka pounced on some slack defending to get a goal back, giving Milan hopes of coming back from 2-0 down for the second Serie A match in a row.
Chances came and went for both teams in a breathless end-to-end encounter, with Mario Pasalic hitting the crossbar for Vincenzo Montella's side while Mertens twice made a mess of one-on-one opportunities.
Milan continued to press for a leveller in a vibrant San Siro - in which banners could be seen showing solidarity with the victims of the hotel disaster in the mountains of Abruzzo - but Napoli held out for a win that moves them to within a point of leaders Juventus, having played two games more.
For Milan, who have won only one of their last five in the top flight, the seven-point gap to the top three is looking difficult to bridge.
Napoli needed only six minutes to break the deadlock with a spectacular piece of counter-attacking play.
Jorginho won possession and found Mertens, who switched the play first time to Insigne, and the Italy international blasted a left-footed shot into Gianluigi Donnarumma's top-left corner from 20 yards out despite the goalkeeper getting a touch on the ball.
5 - Lorenzo Insigne has now scored his 5th league goal against AC Milan, his favourite target in Serie A. Bogeyman. #milannapoli-- OptaPaolo (@OptaPaolo) January 21, 2017
Three minutes later and Napoli doubled their lead, Mertens this time sliding the ball through to Callejon down the right, and the Spaniard steadied himself before slotting beneath Donnarumma at the near post.
Napoli's incisive one-touch passing was causing problems for Milan's high line and Mertens wasted a glorious chance for 3-0 when he beat the offside trap to reach Allan's cross only to scuff his half-volley into Donnarumma's grasp.
Milan should have halved the deficit 10 minutes before the break but Gustavo Gomez steered his header wide when he met Giacomo Bonaventura's cross from the left unmarked near the penalty spot.
But moments later, Kucka kept his composure far better to prod the ball beyond Pepe Reina and into the bottom-right corner after their high press forced Lorenzo Tonelli into conceding possession.
Pasalic headed against the crossbar and Jose Sosa brought a low save from Reina inside the first three minutes of the second half as Montella's side pressed for an equaliser.
Carlos Bacca came inches from turning Ignazio Abate's cut-back over the line before Insigne almost produced one of the goals of the season, twisting his way into space just inside the Milan half before sending a 45-yard chip onto the roof of the net.
Reina denied Bacca following a good run from Bonaventura before Mertens failed to make the points safe for Napoli, as Donnarumma - making his 50th Serie A appearance - saved low to his left to deny the Belgium winger after he broke through the Milan defence.
Callejon became the eighth player to be booked as the game became scrappy in the closing stages, with both teams visibly tiring, but Napoli held out for a result that will give them renewed belief in their title chances.