The Barcelona goalkeeper replaced Iker Casillas at half-time of the match in Johannesburg but limped out of the action with 13 minutes remaining.
An initial diagnosis suggests Valdes has suffered a torn calf but he is set for more tests when the squad returns to Spain.
A medical statement on the Spanish football federation's website read: "Victor Valdes, possible calf tear of the right leg.
"This Wednesday he will have new tests at his club to determine the exact extent of the injury. The national team doctors treated the goalkeeper immediately after he retired from the game in the 77th minute. They have determined that he could have suffered a torn calf in the right leg.
"Valdes was injured after going to clear the ball in a dangerous South Africa counter-attack."
Spain lost the match 1-0 at the same venue where they won the 2010 FIFA World Cup South Africa™ final.