Trailing 3-1 from the first leg, Napoli threw everything they had at the reigning champions in an electrifying early spell, and took a deserved lead through Dries Mertens midway through the first half.
But after Cristiano Ronaldo struck a post before the break, Sergio Ramos scored twice in the space of six second-half minutes to turn the tie on its head, with Alvaro Morata adding a final flourish.
Napoli appeared full of belief in the first-half as they kept a Madrid side featuring Ronaldo, Gareth Bale and Karim Benzema on the back foot. There were early chances for Mertens, Marek Hamsik and Lorenzo Insigne before the deadlock was broken.
The goal came in the 24th minute as Hamsik’s early pass picked out the run of Mertens down the left and the Belgian fired a shot low across goal and in off the post.
That only whipped up the atmosphere at the Stadio San Paolo further but Madrid were quick to counter, going close to levelling the scores when Ronaldo’s run split the defence and he sent a shot against the post in the 29th minute.
Napoli appeared to heed the warning as they re-asserted control, with Kalidou Koulibaly heading over and Mertens striking a shot against the outside of the post.
The hosts emerged for the second-half full of running once more, but the momentum shifted in the 51st minute when Madrid counter-attacked swiftly and won a corner from which Ramos headed them level.
Napoli had barely had chance to recover before Madrid took the lead, again from a corner. Once more Toni Kroos was the provider as Ramos headed home his eighth goal of the season.
That proved pretty much conclusive as Napoli struggled to regroup and reassert themselves in the match.
Dani Carvajal had a golden chance to add to Madrid’s margin of victory as the match moved into the final 10 minutes, but spooned the ball horribly over with the goal gaping. Instead Morata would have the final word as he rifled home Madrid’s third of the night and sixth of the tie in stoppage time after Jose Reina failed to hold Ronaldo’s shot, palming it straight into Morata’s path.
Reina, Hysaj, Albiol, Koulibaly, Ghoulam, Allan (Rog 55), Diawara, Hamsik (Zielinski 75), Callejon, Mertens, Insigne (Milik 70).
Rafael Cabral, Jorginho, Maggio, Maksimovic.
Navas, Carvajal, Pepe, Sergio Ramos, Marcelo, Modric (Isco 80), Casemiro, Kroos, Bale (Lucas 68), Benzema (Morata 77), Ronaldo.
Casilla, Nacho, Rodriguez, Danilo.
Cuneyt Cakir (Turkey).