This article is more than
6 year oldRoberto Martinez's side were trailing 2-0 when he brought on Marouane Fellaini and Nacer Chadli in the 65th minute, and Fellaini scored the equaliser before Chadli netted a 94th-minute winner.
They now face Brazil in the last eight on Friday.
Japan looked on their way to a famous win in Rostov after Genki Haraguchi ran onto Gaku Shibasaki's long ball, which Jan Vertonghen should have cut out, to open the scoring.
Takashi Inui's 25-yard strike made it 2-0 and looked set to take the Asian side into their first quarter-final.
Belgium's Premier League stars - their golden generation - had put in a disappointing performance, and Martinez turned to the oft-ridiculed Fellaini and West Brom winger Chadli in his hour of need.
Their fortunes changed after that as Vertonghen scored a looping header to get them back into the game.
Fellaini then headed in Eden Hazard's cross to level before Chadli converted Thomas Meunier's pass to finish off a flowing move and help the Red Devils avoid being the latest victims of a World Cup of shocks.
Belgium are the first team to fight back from two goals down to win a World Cup knockout game since West Germany against England in 1970.
Belgium clearly have the players - Hazard, Kevin de Bruyne, Romelu Lukaku and Thibaut Courtois are some of the Premier League's undoubted stars. They are now unbeaten in 23 games, but there are always questions about whether they are tactically astute.
Martinez and his players will feel they have gone some way to answering those, and finding a real winning touch, having looked dead and buried after an hour.
Chelsea winger Hazard had hit the post in one of their few good chances in the opening 60 minutes.
But they ground their way back into the game - even though the goal to give them hope was a bit of a fluke. Inui booted the ball up into the air and Vertonghen's looping header flew over keeper Eiji Kawashima, who should have done better.
At 20 yards, it is the longest headed World Cup goal since those stats were first recorded in 1966.
Then the substitutes came to the fore. Fellaini, who signed a new Manchester United deal last week, powered in Hazard's centre to level the scores after 74 minutes.
And the winner was a real team effort. Goalkeeper Courtois rolled the ball to De Bruyne, who had been quiet for 90 minutes but exploded into life when his country needed him.
The Manchester City playmaker carried the ball 60 yards before feeding Meunier, his cross was stepped over by Lukaku, and Chadli was on hand to steer it home.
Lukaku had scored 17 goals in his previous 11 Belgium games but his decision to not shoot on this occasion might prove more crucial than any of those.
Belgium will feel a huge amount of spirit building after this fightback - and also when they reflect on the fact their last defeat was Martinez's first game in charge, against Spain in September 2016.
Their past two tournaments - the 2014 World Cup and Euro 2016 - have both come to an end at the quarter-final stage. The Red Devils, who have never won a major tournament, will be desperate to go at least one step further this time - but there is one huge problem.
Their next game is against the favourites to win the tournament, five-time champions Brazil, on Friday in Kazan. The winner of that game faces either 1998 kings France or two-time winners Uruguay for a place in the final.
They will not need reminding that if they had lost to England in the final group game, instead of beating them, no World Cup winners would have stood between them and the final.
"Belgium had to dig deep from within and they did it so well," said BBC Radio 5 live's Chris Sutton. "Belgium are not going to have a harder game than this all tournament. They were in a real scrap."
Japan have taken big gambles in the past few months and after an hour in Rostov, it looked like they were paying off in style.
First they sacked head coach Vahid Halilhodzic and replaced him with Akira Nishino two months before the tournament started.
Then they controversially sat back in order to maintain a 1-0 deficit in their defeat by Poland in their final group game - even though a goal elsewhere could have knocked them out.
And it looked as if the Blue Samurai were going to become only the third Asian nation - after South Korea in 2002 and North Korea in 1966 - to reach the World Cup quarter-finals when they deservedly took the lead.
Haraguchi kept his composure to shoot across Courtois and give them the lead and then the impressive Inui blasted in a long-range second to put them in control.
In truth, they did not have a host of chances - with only four shots on target - and all the momentum had deserted them by the time Chadli placed the ball past Kawashima with seconds remaining.
"Japan will regret the last two minutes because they threw everything forward and they were a little bit too open at the back," said BBC One pundit Jurgen Klinsmann, a former Germany international. "In the 94th minute, the players are tired and they are thinking about extra time, and that is when mistakes happen."
Belgium boss Roberto Martinez: "You get pushed in games. Let's congratulate Japan, they played the perfect game. They were clinical on the counter and so solid. It was a test of character and you see the reaction of our subs coming on to win the game. It tells you everything about this group of players.
"No negatives today, it was about getting through. It is a day to be very proud of these players. Keep believing in Belgium. In the World Cup you want to be perfect but it's about getting through, it's about winning."
Japan coach Akira Nishino: "I am devastated. Yes we took the lead but we couldn't win. It might have been a very small difference but I felt there was nothing in it.
"Maybe it was my decisions as a coach or my tactics, and we couldn't keep up with Belgium, who upped their game.
"I don't want to admit it. I do feel that it was a tragedy but I have to accept the defeat as a fact."
Newer articles
<p>The deployment of Kim Jong-un’s troops has added fuel to the growing fire in recent weeks. Now there are claims Vladimir Putin has put them to use.</p>