With Hirscher out, first-run leader Henrik Kristoffersen -- second to the Austrian in the overall World Cup standings -- was favorite to take gold only for the Norwegian to fail to complete his second run.
Sweden's Andre Myhrer, with just one World Cup victory this year, was the surprise winner and, aged 35, becomes the oldest Olympic medalist in this event.
"Coming into this race he [Hirscher] and Henrik were the favorites. To be able to do this after the season that they had is amazing for me," said Myhrer, slalom bronze medalist in Vancouver eight years ago.
"It means everything. I've been training my whole life for a moment like this. I'm totally blown away."
Ramon Zenhaeusern of Switzerland secured silver, finishing 0.34 seconds behind the Swede, while Austria's Michael Matt claimed bronze four years after his older brother Mario took gold in the same event. Another Matt brother, Andreas, claimed silver in the men's ski cross at Vancouver 2010.
Poor race not a surprise for Hirscher
In tricky conditions, only 43 of the 108 starters completed the race and star man Hirscher was the first to fall.
The six-time world champion had filled the only gap in his resume with golds in the combined and giant slalom in Pyeongchang and was favorite to claim a third Thursday.
But in trying to become the first male skier in 50 years to win three Olympic gold medals, the 28-year-old missed a gate in the first run and failed to finish a slalom race for the first time in two years.
After the race, Hirscher said he knew even before the first run that there would be "no chance" of a medal because training had gone badly.
"The feeling was really bad the whole week on slalom skis and this is the final result," he told reporters.
"I had absolutely no confidence on this kind of snow. I skied really badly. This is what also can happen and is part of the game, part of the sport. You have success and sometimes you have not the best days.
"On GS (giant slalom) it was OK with the snow conditions, but with slalom skis I really don't prefer these aggressive conditions but this is definitely my mistake."
Austrian great more nervous than usual
Slalom silver in 2014 had been Hirscher's only medal from two previous Olympics, and the overriding question in the build-up to these Games was whether the greatest skier of his generation could win Olympic gold.
He put that question to bed on day four by winning the combined, telling reporters: "I'm super happy because this stupid question has gone away."
His winning margin of 1.27 seconds in the men's giant slalom was the largest Olympics lead in 50 years. More was expected Thursday in an event in which he was world champion in 2013 and 2017.
Only three Alpine skiers have won gold medals in three different events at the Olympics -- Austrian Tony Sailer, France's Jean-Claude Killy and Croatia's Janica Kostelic -- and Hirscher's chances of joining that elite list now appear to have gone with the skier having said that he will not compete in Beijing 2022.
"After wining two gold medals there is no pressure at all," said Hirscher who, with 55 World Cup wins, is second only to Ingemar Stenmark's 86 on the men's all-time list.
"Everything is fine, I feel sorry for my special discipline slalom, but on the other side these were very successful Olympic Games."
On the eve of the slalom race, Michael Pircher, Hirscher's coach, told CNN Sport that his star skier -- a man so well known in Austria that he cannot go to the cinema without being mobbed -- had been more nervous than usual during these Games.
"We thought after the gold medal in super combined he could be more relaxed but the opposite happened, he was more concentrated, more focused, more nervous," said Pircher.
"We thought our goal was one gold medal, that it could be easier for the next race, but it was the opposite. We're under electricity."