Lorenzo Insigne's magical strike broke Shakhtar Donetsk's defences and Napoli went on to a 3-0 win, which gives them hope of Champions League progress.
The Partenopei lost 2-1 in Ukraine and needed to win here in order to have any chance of still going through to the next round of the Champions League and even that might not be enough. They now need Manchester City to beat Shakhtar in Ukraine and for them to see off bottom club Feyenoord to finish second on a superior head-to-head record.
Vlad Chiriches stepped in for suspended Kalidou Koulibaly, while Elseid Hysaj moved over to the left to make way for Christian Maggio, with Faouzi Ghoulam and Arkadiusz Milik injured. Shakhtar missed Darijo Srna, Sergiy Kryvstov and Maksym Malyshev.
There was a great chance within 120 seconds, as Jose Callejon was released by Insigne, but Andriy Pyatov rushed off his line to smother from point-blank range with his body.
Taison blasted over from distance after a corner, then fired inches wide of the near stick after Amadou Diawara was caught in possession.
Pyatov flew to fingertip a Lorenzo Insigne curler out of the far top corner and Marek Hamsik blasted over moments later. However, Pepe Reina also had his gloves stung by Marlos, who had turned Hysaj inside out to create space for his strike from 12 yards. The goalkeeper also palmed away a powerful long-range effort from Fred.
After the restart, Diawara's strike was deflected over by Rakitskiy and Napoli broke through with a moment of magic from Insigne. He cut inside from the left flank and curled an unstoppable right-foot effort into the far top corner, the quintessential Insigne goal.
Insigne had been a doubt to feature at all due to a knee problem and went off 10 minutes later. Piotr Zielinski was moved into a more advanced role instead and the Poland international missed an absolute sitter when Mertens robbed Pyatov and set up Zielinski to balloon over an open goal from 12 yards.
Ismaily brought down Callejon as he ran on to a long ball just outside the penalty area and Mertens curled the resulting free kick not far off target.
Zielinski made up for his earlier howler, as he surged forward, combined with Mertens and this time found the net at the end of the sweeping team move.
Moments later it was 3-0, as Marko Rog's scorcher from distance was deflected wide and on the corner Pyatov flew to fingertip a Raul Albiol header, but could do nothing on Mertens nodding in the rebound from a yard.