The AC Milan striker was booked off camera following the clash, which means he is suspended for Sweden's crucial World Cup play-off.
Sweden and Spain faced off in a vital top-of-the-group clash at the Estadio de La Cartuja in Seville, with qualification for Qatar 2022 on the line.
The pair played out a 0-0 draw at Euro 2020 this summer, but there was late drama at this game.
Alvaro Morata was on hand to get a 1-0 winner in the 86th minute after Robin Olsen had tipped Dani Olmo's header onto the crossbar.
It sealed Spain's place in the 2022 Qatar World Cup, as they qualified for the tournament for the 12th consecutive time.
Sweden must now qualify for the World Cup through the play-offs, which take place in March, but they will be without former Manchester United star Ibrahimovic after his rash late challenge.
Not even Zlatan could inspire his side to victory over Spain after being brought on in the 73rd minute.
The 40-year-old, who only returned to the international fold this year after a five-year absence, failed to make much of an impact on the game.
His only real involvement was a shocking incident where he was seen planting a firm shoulder in the back of Chelsea defender Cesar Azpilicueta before a corner.
The defender was left in a heap on the ground and, although it appeared Zlatan escaped any punishment, the post-match report shows the frontman was booked off camera in stoppage-time following the incident.
And, with it being his second caution during Sweden's qualifying campaign, it means he is now set to miss the first game of their play-off tie in March.
Azpilicueta soothed any fears of an injury, though, as the Chelsea star posted on Twitter after the match: "Everything is good here."
And Spain had the last laugh, as they qualified for next year's tournament.
After the match, boss Luis Enrique admitted: "I felt more pressure now then in the Euros.
"We tried to work a lot on the mental side, always trying to keep it positive and the players responded well. I'm so proud of them and how they responded."