Thorgan Hazard’s early double left Switzerland needing to win by two goals to qualify from Group A2 but the hosts quickly fought back, with Ricardo Rodriguez’s penalty and Seferovic’s first two goals seeing them into a 3-2 half-time lead.
Nico Elvedi nodded home a Xherdan Shaqiri cross in the 62nd minute, and Vladimir Petkovic’s men sealed a stunning win when Seferovic completed his treble late on.
After a thrilling match that continued a trend of goal-filled encounters in the inaugural edition of the Nations League, Switzerland will play at the finals in June next year, alongside European champions Portugal and England, with the final spot going to either France or the Netherlands on Monday.
Roberto Martinez’s men saw their six-match unbeaten run since reaching the World Cup semi-finals brought to an shuddering halt.
Thorgan Hazard set the tone for the game in only the second minute as dreadful defending by Swiss centre-back Elvedi allowed him to slot home.
The 25-year-old winger continued his excellent recent form with a magnificent individual strike in the 17th minute, carrying the ball forwards at pace before hammering a low drive into the bottom corner from the edge of the box.
The Borussia Moenchengladbach man has now scored 12 goals for club and country this season.
That left the hosts with a mountain to climb, but Rodriguez got them on the scoresheet in the 26th minute from the spot after Nacer Chadli fouled Kevin Mbabu.
Liverpool forward Shaqiri was starting to have a bigger impact on the game and he headed the ball across goal for Seferovic to tap in his first just after the half-hour mark to keep the game alive.
Benfica striker Seferovic sent the crowd in Lucerne into raptures with a wonderful curling finish shortly before half-time as a famous fightback beckoned.
Switzerland continued to press at the start of the second period, with Shaqiri bending a free-kick narrowly over the crossbar.
Shaqiri, who has been revitalised since joining Liverpool from Stoke in the close season, was the architect of the all-important fourth goal, creating space for a whipped cross which only needed a glancing touch from Elvedi.
Belgium still only needed one goal to snatch top spot in the group, but Seferovic put that beyond reach of the away side by twisting to head home in the 84th minute.
There was still time for Switzerland goalkeeper Yann Sommer to be forced into saves by Eden Hazard and Belgian substitute Michy Batshuayi, but the hosts held on and almost scored a sixth when Denis Zakaria was denied at point-blank range by Thibaut Courtois.
– Austria finish with win –
Earlier on Sunday, Valentino Lazaro scored an injury-time winner as Austria beat Northern Ireland 2-1 in a dead rubber in Belfast that Marko Arnautovic described as a “fight”.
Northern Ireland had already been relegated from Group B3, while Austria were guaranteed to finish second.
“We can be proud of the win. We wanted to come here, to finish well with a win and we did that,” West Ham forward Arnautovic told Sky Sports.
“He (Northern Ireland centre-back Gareth McAuley) tried to choke me, he tried to fight with me, I don’t know why. It is not good to fight with me.”
Elsewhere, Belarus edged to a 2-0 win over San Marino to wrap up promotion from Group D2, ending Luxembourg and Moldova’s slim hopes as they played out a 1-1 draw in Chisinau.