The Italian side, trailing 1-0 from the first leg, had piled forward throughout the match and led through Goran Pandev's 20th minute goal.
A second seemed a matter of time as the chances kept coming, but instead substitute Nabil Ghilas levelled for Porto in a 69th-minute counter-attack before Ricardo Quaresma killed off Napoli with brilliant individual effort, meaning Duvan Zapata's injury-time goal to make it 2-2 on the night was mere consolation.
Napoli hit the ground running in the first half as Lorenzo Insigne and Dries Mertens had early efforts, and they were screaming for a penalty when Faouzi Ghoulam tumbled in the penalty area, but referee Martin Atkinson waved the appeals away.
Gonzalo Higuain should have put Napoli in front in the 16th minute when he latched on to a fine ball from Henrique but, with all the time he could need, he tried a first-time lob rather than taking a touch.
Not that it mattered too much, however, as Pandev grabbed the opener moments later, beating the offside trap to race on to Higuain's pass and lift it over the goalkeeper.
The hosts were well on top and kept the pressure coming as Mertens fired a low shot at goal after Insigne's free-kick struck the wall, with Fabiano doing well to cover.
There was a warning soon after as Porto went close with a rare attack, Jackson Martinez's header drifting just wide with the Pepe Reina beaten.
But Mertens then flashed another fine effort narrowly wide for Napoli, and the half ended with Insigne firing the ball into the side-netting.
Napoli looked to pick up in the second half where they had finished the first, with Insigne going close in the opening stages. Fabiano denied him, and then Pandev missed a glorious chance from the following corner before Ghoulam curled an effort wide.
A set-piece gave Porto a rare chance at the other end but Carlos Eduardo's glancing header bounced just the wrong side of the post, and Napoli quickly raced to the other end where Fabiano just did enough to turn Higuain's close-range effort around the post.
Gokhan Inler went close with a header from the resulting corner and then Mertens drilled a shot just wide, but still the second goal would not come for the hosts.
The Porto goal seemed to be living a charmed life as another effort from Mertens looped over the crossbar and on to the roof of the net.
Then, out of nowhere, Porto struck with a killer goal.
Martinez was fouled in midfield but the referee played advantage and Fernando played in Ghilas, barely on the pitch five minutes, and he turned to lash it into the bottom corner.
Napoli were rocked, and just two minutes later, Steven Defour's almost nonchalant effort struck the outside of Reina's post as the visitors threatened to finish it off.
It was effectively all over five minutes later as Quaresma wriggled his way through the Napoli defence and blasted the ball into the top corner of the net.
Zapata fired in from close range in stoppage time, but it was too little, too late for Napoli.