They will meet Belgium in the Round of 16 on July 2 after reaching the knockout stage for the third time in their history.
When Jan Bednarek scored his first international goal in the 60th minute for already eliminated Poland, the score between Colombia and Senegal stood at 0-0 meaning Japan were going out.
But once news filtered through of Yessy Mina's 74th minute goal for Colombia the match noticeably slowed down.
The strike meant Colombia would win the group and Japan were ahead of Senegal despite identical points, goal difference and goals scored, because they had received fewer yellow cards.
Group H came down to the finest of margins. #JPN go through ahead of #SEN, with the Lions of Teranga eliminated on Fair Play points. pic.twitter.com/YCDk0hSWmL
— FIFA World Cup (@FIFAWorldCup) June 28, 2018
Japan coach Akira Nishino made six changes, including bringing in attacking pair Shinji Okazaki and Yoshinori Muto for his World Cup debut.
And it was they who fashioned the first real opening in the 12th minute of a game played in 36 Celsius temperatures.
Bednarek played a blind pass across his penalty area straight to Muto who shifted it to Yuto Nagatomo motoring down the left flank.
His whipped cross was met by a diving Okazaki header which flashed wide.
Moments later Muto won possession again outside the box and his fierce shot was parried out of harm's way by goalkeeper Lukasz Fabianski, one of five changes in Poland's starting line-up.
Polish captain Robert Lewandowski is renowned as a world-class goalscorer for Bayern Munich but, as in the rest of Poland's World Cup campaign, he was seeing little of the ball.
Goalkeeper Eiji Kawashima kept his place for the Samurai Blue despite a mistake for Senegal's first goal in the 2-2 draw and repaid Nishino's faith with a wondrous save to keep the score goalless at half-time.
Piotr Zielinski crossed from the right and Kamil Grosicki found himself unmarked near the penalty.
His cleverly directed header looked destined for the bottom corner until Kawashima made up huge amounts of ground to claw it to safety with a right hand at full stretch.
Goalline technology confirmed he had kept it out by less than half the width of the ball but that was just about all Poland had offered as they headed for the shortish plane ride back to Warsaw.
Kawashima did it again in the second half to prevent what would have been a Tomoaki Nakino own goal.
Okazaki had run his heart out in the sapping conditions and gave way to Yuya Osaka in the 47th minute as Nishino introduced fresh legs.
Kawashima did have to pick the ball out of his net on the hour mark as Bednarak got on the end of a Rafal Kurzawa long free-kick to volley home at the back post but, as the Colombia-Seneral result filtered in, Japan were through.
Sources: AFP, FIFA via Getty Images