Second-half substitute Niclas Fullkrug saved Germany's blushes, ramming home a low finish from close range on 51 minutes to preserve new coach Julian Nagelsmann's unbeaten record.
Germany had arrived in Philadelphia in confident mood after a 3-1 defeat of the United States on Saturday.
That victory was the first of Nagelsmann's reign since being appointed in the aftermath of Hansi Flick's sacking last month following a 4-1 drubbing by Japan.
The four-time world champions looked ready to build on that confident performance at a packed Lincoln Financial Field, and took the lead inside the opening half hour.
Union Berlin defender Robin Gosens flicked on cleverly from a corner and Real Madrid defender Antonio Rudiger was waiting at the far post to head in an emphatic finish after 25 minutes.
![Match stats Match stats](https://livesport-ott-images.ssl.cdn.cra.cz/r900xfq60/8d446cba-faaf-4a3e-a2b9-62de90500bf3.jpg)
Mexico responded well to that early setback, and Santiago Gimenez had a strong penalty appeal waved away on 27 minutes after being bundled over the box.
Gimenez should have equalised in the 33rd minute, but somehow scooped a close-range shot over the bar with only Germany goalkeeper Marc-Andre Ter Stegen to beat.
Germany thought they had made it 2-0 on 37 minutes when Bayern Munich's Thomas Muller got the ball in the net only to be judged offside.
Instead, however, Mexico swept forward immediately with a lightning fast counter-attack and drew level when Uriel Antuna tucked away a low shot at the near post after Hirving Lozano's low cross.
Erick Sanchez headed Mexico into the lead two minutes after half-time to make it 2-1 but Fullkrug's 51st-minute equaliser ensured Germany escaped with a draw.