Joachim Low’s side came into the tournament on a run of poor form, winning just one of their six friendlies since qualifying for Russia 2018 with a 100 per cent record.
Those recent struggles were evident from the outset against a vibrant Mexico, who scarcely gave their more illustrious opponents a chance to settle during a pulsating opening.
Their positive approach was rewarded with the only goal of the game after 35 minutes when Hirving Lozano finished off a flowing counter-attacking move with a crisp drive.
Joshua Kimmich and Timo Werner both came close in the second period, but Mexico were able to hold on for a famous victory with something approaching relative comfort.
Low must quickly lift his team for their next Group F game against Sweden on Saturday, while Mexico know a win against South Korea on the same day would give them a wonderful chance of qualifying for the knockout stages.