The hosts triumphed 28-21 in Yokohama, sparking jubilant scenes as they reached the quarter-finals of the tournament for the first time.
Japan have won four matches from four at their home tournament and, as Pool A winners, they go on to face South Africa next Sunday in Tokyo, with rugby fever gripping the country.
This has otherwise been a grim weekend in Japan, though, as the deadly tropical storm has claimed more than 20 lives, according to local reports, with many others missing and considerable damage done to property.
"It's a tough time at the moment with the typhoon and all, but I'd like to thank everyone that made this game happen, and for everyone that's suffering at the moment with the typhoon, this game was for you guys," said Japan captain Leitch.
"The crowd was massive for us. Our hearts go out to all the people who are suffering."
Coach Joseph said: "You can look around and see how special a moment this is for our team and for this country.
"Before I talk about the footy, I really want to acknowledge the families who've lost people in the typhoon today. That's really motivated our team. We talked about that this morning as a group. The players really wanted to play."
— Rugby World Cup (@rugbyworldcup) October 13, 2019
Leitch said he was "very, very proud" of Japan's achievement, after they blazed to a 28-7 lead and resisted a Scotland fightback in impressive fashion.
"From the very start, we played with our heart," Leitch said. "Today was nothing about skill. It was all about emotion and physicality and I think we showed that today.
"We’re going to give it everything in the next couple of games."
If Japan are to still have a "couple of games" to play, they must overcome the Springboks - as they famously did four years ago in Brighton in a victory that has provided the springboard to success for this impressive new generation.
Coach Joseph enthused about the latest performance, saying: "My team, for all the World Cup really, we've prepared really, really well and put their bodies on the line every weekend. But tonight they went [up] another level, I felt.
"They gave everything they possibly could. Everyone from our most experienced player to our least experienced gave 150 per cent."
Photo Getty Images Caption: Jamie Joseph celebrates victory with Japan's players