Own goals from Martin Dubravka and Juraj Kucka either side of strikes from Aymeric Laporte, Pablo Sarabia and Ferran Torres secured La Roja their biggest ever victory in the competition.
Alvaro Morata's missed penalty early on suggested it was going to be another long night for Spain. But Dubravka inadvertently gave La Roja the lead by pushing the ball into his own net while making a clearance.
The hosts were on the front foot, and just before half-time, Laporte doubled their advantage after Slovakia failed to clear Koke's free-kick.
The second half turned out to be a complete rout, with Sarabia and substitute Torres joining the act before Kucka inadvertently kicked the ball into his own net to add insult to Slovakia's misery.
Their poor goal difference meant Slovakia were knocked out, while Spain finished second after Sweden beat Poland in the other group game. Spain next face Croatia in Copenhagen on Monday for a place in the Euro 2020 quarter-finals.
On that note, here are the five major talking points from Seville:
#1 Spain turn the heat on Slovakia
Spain finally came to the party at Euro 2020 with a big win. The former champions bounced back spectacularly from an early penalty miss to crush Slovakia, registering the biggest victory of Euro 2020 so far.
Dubravka's own goal swung the momentum in La Roja's favour, and they didn't look thereafter, switching to a higher gear after the break. Spain moved the ball around quickly to leave their visitors in knots, making the most of their opportunities from set-pieces.
It was a vintage performance from Spain, who cruised into the last-16 in style.
#2 Dubravka makes unwanted history
Martin Dubravka left the field against Spain with mixed emotions. He was Slovakia's hero after stopping a penalty from Morata but soon conceded a clumsy own goal that allowed Spain back into the match.
The Newcastle United custodian deserves credit for guessing the right way and stopping Morata's effort from 12 yards. But Duvravka inexplicably diverted the ball into his own net while attempting to flush out danger. That made Duvravka the first goalkeeper in European Championship history to save a penalty and concede an own goal in the same game.
It was the seventh own-goal at Euro 2020, and the group stage is not over yet.