The 32-year-old keeper saved Koke's and Iago Aspas' spot kicks after both teams had scored two apiece in what was Russia's first ever World Cup penalty shootout, to send his team to the last eight after a lacklustre 1-1 draw over 120 minutes.
In the shootouts, it was Akinfeev who emerged as the hero, first diving right to keep Koke's effort out, before denying Aspas with his feet, as the World Cup witnessed yet another fairytale and Russian Federation 2018 lost one more of the so-called pure-bred teams.
The victor will go on to face either Croatia or Denmark in the quarterfinals.
The second half was an even more exaggerated version of the first.
Spain came to the finals unbeaten in 20 matches since Lopetegui took over following Euro 2016, with the 2010 world champions winning just once in four games with Hierro at the helm.
It gave Russian Federation its greatest win in global football for 10 years, since Akinfeev was in goal for an extra-time victory over the Netherlands in a European Championship quarterfinal.
The heavens opened up with five minutes left on the clock to add to the drama, which would be decided on penalties.
Spain enjoyed the majority of the possession as half-time approached but were unable to penetrate Russia's well-organised defence and were punished in the 41st minute.
Iniesta almost got the victor for Spain in the closing stages with a half-volley from outside the box but goalkeeper Igor Akinfeev made a good save.
Attention now turns to the 7pm kick-off between Denmark and Croatia. "We have to get better, we haven't produced our best football", said Bayern Munich midfielder Thiago Alcantara.
Spain had 25 shots, nine of which were on frame, but Akinfeev saved them all, only conceded on an unfortunate own goal.
Igor Akinfeev. Any day you save two penalties in a shootout is a good day.
Rodrigo went close in the 109th minute as the substitute skinned his marker with a sharp turn to race away down the right flank and advance into the box before forcing Akinfeev to parry away his angled shot from six yards out.
Isco - 8 - Spain's chief architect, and the side's emblematic player of the tournament so far, Isco was the standout player from this match as he dictated the tempo of play.