In his debut at the race, the 22-year-old Sunweb rider - who also won two stages on the Tour de France this year - waited for the right moment to pounce, some 100 metres from the line in the climb up to the Mur de Huy, a brutal 1.3-km ascent at an average gradient of 9.6%.
France's Benoit Cosnefroy took second place ahead of Canadian Michael Woods.
The incredible win confirms the Swiss rider's status as one of the top prospects in cycling.
"It's just brutal," Hirschi said of the steep ride to the top.
"You have to be strong in the head to get through the pain."
Hirschi added his first win in a classic to his bronze medal from the world championships road race last weekend.
Richie Porte was the best of the Australian riders, finishing in eighth place only five seconds behind Hirschi.
Newly-crowned world champion Julian Alaphilippe, winner of the past two editions, opted out as he recovers for Sunday's Liege-Bastogne-Liege Monument classic - LIVE, FREE and in HD on SBS VICELAND and live streamed via SBS On Demand.