Khedira, 27, missed most of last season with Real Madrid due to injury but returned in time to play a role for Germany as they reached the World Cup final in Brazil.
However, doctor Hans-Wilhelm Muller-Wohlfahrt advised Khedira not to take to the field in the Maracana after spotting something was amiss from the touchline.
"I saw that something was not right with Khedira when he was warming up," Muller-Wohlfahrt said on Sunday at an awards ceremony in Munich.
"I felt that there was a bit too much tension in his calf. When Jogi [Germany coach Joachim Loew] asked me what was wrong, I told him: 'If he starts, then he's going to come off after 10 minutes, or he's not going to be able to sprint.
"In such cases, I've got to trust my hands and that comes from experience. Khedira said to me: 'Doc, if you tell me I can't play, then I won't play'."
As misfortune would have it, Khedira's replacement Christoph Kramer did not even make it halfway through the first half before a head injury saw him replaced by Chelsea's Andre Schurrle.
Meanwhile, Khedira looks increasingly likely to have played his last game for Real Madrid.
After being linked with a move to Arsenal for much of the summer, it is now being reported in Spain that he is being offered as a makeweight in Real's bid to sign James Rodriguez from Monaco.
Khedira's contract with Real expires next summer and both he and Angel Di Maria could be used to help bridge the gap between Real's cash offer for Rodriguez and the 85 million euros the Ligue 1 club are reportedly demanding for the Colombian striker, who won the Golden Boot at the World Cup with six goals.
Di Maria, Khedira set to leave Real Madrid?
Sid Lowe gives the latest on who's arriving and who's leaving La Liga.