A 1-1 draw had previously been played out, with an own goal from Sergei Ignashevich being cancelled out by Artem Dzyuba's penalty just before the break, and Russia spent the rest of the game looking to stay on level terms.
Spain quickly set about gaining control of possession while Russia were content to try to stifle Spain in the final third by keeping a back three on their own 18-yard line.
However, that gameplan was effectively ripped up when Spain went ahead in the 12th minute. A free kick from the right was heading for Sergio Ramos but Ignashevich was focused on grappling with the Spain skipper and ignored the ball, which bounced off his heel and went into the far corner of the net.
The opener led to a bit of a stand-off with Spain showing little intent to create chances but once Russia got on the ball, they looked to get Dzyuba involved with the tall forward frequently getting the better of Ramos in the air.
A knockdown led to Aleksandr Golovin curling marginally wide of the far post from 16 yards but minutes later, Russia were given a penalty when Gerard Pique put up a hand to block a header from Dzyuba.
Pique was subsequently yellow carded and Dzyuba made no mistake from the spot, drilling the ball into the bottom corner for his third goal of the tournament.
At this point, Spain had not had a shot on goal but twice in added-on time, Diego Costa attempted to regain his side's advantage, only to see a shot from an acute angle and a header saved by Akinfeev.
Spain picked up where they let off after the restart with Jordi Alba getting on the end of a cross from the right, but the full-back's effort was tame and straight at Akinfeev.
Russia were showing more attacking intent than before the interval but the game soon developed into a replica of the opening 45 minutes with significant chances on goal few and far between.
Both teams made their three changes but the pattern of the game did not change with Spain growing frustrated with Russia spending much of the final quarter inside of their own final third.
With five minutes left, a chance was finally created for Andres Iniesta by Aspas, but the midfielder's first-time volley was well parried by Akinfeev down to his right.
The game - almost inevitably - went to extra time with both teams continuing where they had left off and Dani Carvajal could have perhaps done better when meeting a cutback from Aspas.
Pique also had a header easily saved by Akinfeev, before the Russia stopper had to remain alert to produce another timely block after Rodrigo had gone on a powerful run from the halfway line before getting his shot away from inside the area.
With five minutes left, Spain felt that they should have been awarded a penalty when both Pique and Ramos appeared to be hauled down inside of the box but VAR called for play to continue, much to the disgust of the Spain squad.
Russia survived to take the game to penalties and after four successful spot kicks from the hosts, Aspas missed Spain's fifth to send Russia through to face either Croatia or Denmark in the last eight.
SPAIN (4-2-3-1): De Gea; Nacho (Carvajal 70'), Pique, Ramos, Alba; Busquets, Koke; Asensio (Rodrigo 104'), Isco, Silva (Iniesta 67'); Costa (Aspas 80')
RUSSIA (3-5-1-1): Akinfeev; Kutepov, Ignashevich, Kudryashov; Fernandes, Zobnin, Kuzyaev (Erokhin 97'), Samedov (Cheryshev 61'), Zhirkov (Granat 46'); Golovin; Dzyuba (Smolov 65')