Russia keeper Igor Akinfeev saved Koke's and Iago Aspas' spot kicks in their first ever penalty shootout to send the hosts through.
The 2010 world champions controlled the game with their slick passing but did little more, failing to create another scoring chance in the first half.
Russia looked equally toothless up front, with Aleksandr Golovin's curled effort their only noteworthy opportunity until Gerard Pique's handball gave them a chance to level with a penalty in the 42nd minute.
Forward Artem Dzyuba buried it for his third goal of the tournament, sending Spain keeper David de Gea the wrong way to equalise and awaken the subdued 78,000 crowd in Moscow's Luzhniki Stadium.
The game lacked pace and tempo even after the break with both teams cautious not concede too much space and the Russians playing without an out-and-out striker after the substitution of Dzyuba.
Despite 75 percent possession, Spain's famed tiki-taka passing game rarely carried them into the box and they had to wait until the 85th minute to test Akinfeev with a low drive from substitute Andres Iniesta.
Having long run out of steam and with several players cramping, Russia were reduced to desperately defending in extra time as Spain, who played more than four times the number of passes their opponents did, still struggled to slice open the Russian defence.
Akinfeev came to the rescue again to deny Rodrigo after his fine sprint in the second half of extra time before becoming a national hero by saving the two spot kicks to send the hosts past the former world champions.