Inter, who would have clinched a place in Europe's elite club competition with a victory, must now win their final game at home to Empoli, who are fighting relegation and have won their last three games, to guarantee a top-four finish.
Fabian Ruiz scored twice for Napoli -- already sure of finishing second -- after Piotr Zielinski and Dries Mertens set them on their way, while home defender Kalidou Koulibaly made a remarkable goal-line clearance from Lautaro Martinez.
Atalanta on brink of Champions League spot after Juventus draw
With one game left, Inter dropped to fourth with 66 points, behind Atalanta, who drew 1-1 at champions Juventus, on the head-to-head record.
AC Milan are a point behind in fifth after their 2-0 win over Frosinone. Atalanta will host Sassuolo in their final game while AC Milan visit SPAL.
Allegri to leave Juventus at end of season
Zielinski fired Napoli in front with a rasping drive in the 16th minute and Mertens ghosted in behind the Inter defence to head in Jose Callejon's cross in the 61st, the Belgian's 15th league goal of the season. Koulibaly then denied Inter by somehow heading Martinez's powerful drive off the line from right underneath the crossbar.
Ruiz scored twice on the break to finish off the visitors, while Martinez hit the bar in between. Icardi won and converted a soft penalty for Inter in the 81st but it was far too late for Luciano Spalletti's side.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ