Mustafi's World Cup over due to thigh injury
The Sampdoria man was withdrawn after 70 minutes of his country's 2-1 extra-time round-of-16 win over Algeria in Porto Alegre on Monday.
The German Football Association (DFB) revealed on Tuesday that the 22-year-old has been ruled out of the remainder of the tournament.
There was more positive news of Bastian Schweinsteiger, who was replaced by Christoph Kramer with 11 minutes of extra-time remaining.
Bayern Munich midfielder Schweinsteiger was suffering from muscle spasms, but coach Joachim Low said: "It's nothing bad."
Germany will face France at the Maracana in the quarter-finals on Friday.