Spanish forward Jose Callejon scored the winner for the Naples-based club, who are now one point behind second-placed Roma with four games left.
The top two qualify for the Champions League group stage.
Inter are now without a win in six league games and are in seventh spot in the Serie A table.
Earlier, Roma lost 3-1 to Lazio in the Derby della Capitale to leave leaders Juventus four points away from being crowned champions of Italy for a sixth successive season.
AC Milan's hopes of securing a Europa League third qualifying round spot were dented as they were held to a 1-1 draw away at relegation-threatened Crotone.
Milan, who are sixth, finished the game with 10 men after Slovakia midfielder Juraj Kucka was dismissed in the 90th minute.
Palermo secured only a fourth league win of the season to stave off relegation for at least one more game.
The next-to-bottom side beat eighth-placed Fiorentina 2-0 but are still 10 points from safety with four games to go.
Former Roma striker Mattia Destro scored twice as Bologna hammered Udinese 4-0 while there were also wins for Chievo, Cagliari and Sassuolo.
Match ends, Inter Milan 0, Napoli 1.
Second Half ends, Inter Milan 0, Napoli 1.
Attempt saved. Yuto Nagatomo (Inter Milan) header from the centre of the box is saved in the bottom right corner. Assisted by Éver Banega with a cross.
Foul by Arkadiusz Milik (Napoli).
Roberto Gagliardini (Inter Milan) wins a free kick in the attacking half.
Foul by Amadou Diawara (Napoli).
Yuto Nagatomo (Inter Milan) wins a free kick in the defensive half.
Foul by Faouzi Ghoulam (Napoli).
Antonio Candreva (Inter Milan) wins a free kick in the defensive half.
Attempt blocked. Arkadiusz Milik (Napoli) left footed shot from outside the box is blocked.
Arkadiusz Milik (Napoli) wins a free kick in the attacking half.
Foul by Marco Andreolli (Inter Milan).
Attempt blocked. Marcelo Brozovic (Inter Milan) right footed shot from outside the box is blocked.
Substitution, Napoli. Arkadiusz Milik replaces Dries Mertens.
Corner,  Inter Milan. Conceded by Kalidou Koulibaly.
Substitution, Inter Milan. Marco Andreolli replaces Jeison Murillo.
Attempt missed. Marko Rog (Napoli) right footed shot from a difficult angle on the left misses to the left. Assisted by Dries Mertens.
Offside, Napoli. Kalidou Koulibaly tries a through ball, but José Callejón is caught offside.
Attempt blocked. Lorenzo Insigne (Napoli) right footed shot from outside the box is blocked.
Marko Rog (Napoli) is shown the yellow card for a bad foul.
Foul by Marko Rog (Napoli).
Danilo D'Ambrosio (Inter Milan) wins a free kick on the right wing.
Substitution, Inter Milan. Éver Banega replaces Éder.
Substitution, Napoli. Allan replaces Marek Hamsik.
Attempt saved. Ivan Perisic (Inter Milan) right footed shot from the centre of the box is saved in the centre of the goal. Assisted by Danilo D'Ambrosio with a cross.
Attempt missed. Lorenzo Insigne (Napoli) right footed shot from the left side of the box is too high. Assisted by Dries Mertens.
Attempt blocked. Marek Hamsik (Napoli) right footed shot from the centre of the box is blocked. Assisted by Lorenzo Insigne.
Attempt saved. Lorenzo Insigne (Napoli) left footed shot from the centre of the box is saved in the top left corner. Assisted by Faouzi Ghoulam.
Elseid Hysaj (Napoli) wins a free kick on the right wing.
Foul by Ivan Perisic (Inter Milan).
Attempt saved. Marko Rog (Napoli) right footed shot from the centre of the box is saved in the bottom left corner. Assisted by Dries Mertens.
Attempt missed. Antonio Candreva (Inter Milan) right footed shot from the centre of the box misses to the right. Assisted by Mauro Icardi.
Kalidou Koulibaly (Napoli) is shown the yellow card for a bad foul.
Foul by Kalidou Koulibaly (Napoli).
Jeison Murillo (Inter Milan) wins a free kick in the defensive half.
Corner,  Napoli. Conceded by Samir Handanovic.
Attempt saved. Lorenzo Insigne (Napoli) right footed shot from outside the box is saved in the bottom left corner. Assisted by Kalidou Koulibaly.
Corner,  Napoli. Conceded by Yuto Nagatomo.
Substitution, Napoli. Marko Rog replaces Piotr Zielinski.
Attempt blocked. Ivan Perisic (Inter Milan) right footed shot from the left side of the box is blocked. Assisted by Mauro Icardi.
Napoli increased the pressure on Roma in the race for a Champions League group stage place with a narrow victory at Inter Milan.