The shock result was a repeat of their 2018 World Cup nightmare when, as defending champions, they lost their opener to Mexico and, after another defeat by South Korea, were condemned to an unheard of group-stage exit.
Germany looked in total command in the Group E clash but, with each missed chance, left the door open for Japan, who showed almost nothing in attack until a series of substitutions injected some energy in the second half.
Doan equalised in the 75th minute before Asano showed lovely control and smashed the winner in from a tight angle — causing an explosion of joy among the Japan bench.
It was a turnaround that looked scarcely believable as Japan struggled to get any foothold for most of the game.
Germany’s early dominance was rewarded when Joshua Kimmich picked out David Raum in acres of space in the box and goalkeeper Shuichi Gonda clumsily brought him down as he turned, with Guendogan dispatching the penalty in the 33rd minute.
Kai Havertz turned in what he thought was a second in first-half stoppage time and although the assistant referee was about the only person in the Khalifa International stadium not to notice he was a metre offside, VAR duly disallowed it.
There was initially little change to the pattern in the second half as Jamal Musiala shot over after a penetrating run and Guendogan clipped a post.
Gonda then made amends with four successive saves to deny Jonas Hofmann and Serge Gnabry, keeping his side in the game.
Manuel Neuer, appearing in his fourth World Cup, was also alert to save from Hiroki Sakai and did well again soon after to block from Takumi Minamino, only for fellow substitute Doan to smash in the loose ball.
Suddenly buoyed, Japan pushed on and Asano showed great strength to bring down a high free kick and hold off defender Nico Schlotterbeck and fantastic technique to hammer the ball into the smallest of spaces.
Germany launched all-out attack from then on, to no avail, and now face a potentially must-win game next against Spain.
Japan next face Costa Rica and will already be dreaming of the last 16.