Spain defeated Italy at Euro 2008, as well as thrashing them 4-0 in the 2012 final, but this time they had no answer to Antonio Conte's men, who recorded a deserved victory.
Defender Giorgio Chiellini tapped in Italy's opener in the first half and only an impressive goalkeeping performance from David de Gea kept Vicente del Bosque's men in with a chance.
Alvaro Morata headed straight at Gianluigi Buffon as they looked to keep their hopes of a record third consecutive title alive, but wave after wave of Spain attack crashed against the rock-solid Italian defence.
Buffon made a wondrous save to deny Gerard Pique in the last minute of normal time and Graziano Pelle struck the final blow in stoppage time as Italy's slick counter-attack claimed another victim.
After beating Spain at a major competition for the first time since 1994, the prize for the Azzurri is a quarter-final tie against world champions Germany, who they beat en route to the final four years ago, in Bordeaux on Saturday.
Italy were totally dominant in the first half, with De Gea getting down sharply early on to push away Pelle's accurate header from eight yards.
A few moments later, De Gea superbly tipped an Emanuele Giaccherini overhead kick onto the post having not realised the playmaker had been penalised for a foul as he attempted to shoot.
Sergio Ramos had a penalty claim denied after tangling with Chiellini, but Italy continued to look the more likely and Marco Parolo headed just wide.
Italy got the breakthrough in the 33rd minute after Ramos had fouled Pelle just outside the area. Eder's free-kick was parried by De Gea and then kept alive by Giaccherini, allowing Chiellini to prod home from close range.
Just before half-time, Giaccherini cut inside from the left and shot towards the top corner to force a magnificent fingertip save from De Gea, which kept Spain in the match.
Del Bosque brought on Aritz Aduriz for Nolito at the break, although it was Morata who spurned a glorious chance to equalise – heading straight at Buffon from six yards after Cesc Fabregas' delivery.
Italy lost Daniele De Rossi to injury, but they should have killed the game off when Pelle's flick sent Eder racing through on goal, only for De Gea to stand tall and deny the Inter striker.
Spain got better as the match progressed, with David Silva curling wide and Ramos off-target with a header as Italy began to sit back, while Buffon began to have an influence, keeping out Andres Iniesta and Pique from outside the penalty area.
Thiago Motta received a booking that will keep him out of the Germany game for slapping Sergio Busquets in the face, before Buffon made his most vital save – brilliantly keeping out another Pique effort from close range.
Italy sealed a famous triumph on the break when a cross from substitute Matteo Darmian deflected into the path of Pelle, who volleyed home to send Conte and the Azzurri faithful wild.