The Partenopei put in a fine attacking display, with Duvan Zapata and Jose Callejon also among the goalscorers in a seven-goal thriller at the Luigi Ferraris
Duvan Zapata and Lorenzo Insigne gifted the guests a two-goal lead before Eder pegged one back for the home side, only for Jose Callejon to make it 3-1 shortly after.
Marek Hamsik then poured even more misery on Samp after the break, with Shkodran Mustafi's own goal making it five for Rafa Benitez's men before Pawel Wszolek eventually netted the final goal of the game.
The away side started the match with attacking intentions and broke the deadlock after 19 minutes of play. The Sampdoria defence failed to clear a corner kick and Zapata tapped home from close range to make it 1-0.
Napoli continued to dominate after the opener and Insigne doubled his side's lead shortly before the half-hour mark. Callejon set up the young winger, who beat Vincenzo Fiorillio with a shot from outside the area.
Sampdoria refused to give up, though, and immediately pegged one back via Eder, who beat Pepe Reina with an accurate shot via the upright.
Callejon then surprised Fiorillo with a clever free kick that bounced right in front of the Samp goalkeeper to restore Napoli's two-goal lead.
Some excellent work from Zapata after the break saw Hamsik show up in a dangerous position and the Slovakia international kept his calm to score his first Serie A goal since November 2013.
Things only got worse for Sampdoria in the remainder of the game, with Mustafi's unfortunate own goal after a Callejon cross sending Napoli four goals up.
Wszolek made it 5-2 in the closing stages of the game with a fine left-footed finish, but it was too little, too late for the hosts.
Napoli are secured third place in the Serie A table with one more game to go, while Sampdoria currently sit twelfth and will finish in mid-table.