Backs to the wall after a 2-0 defeat last Friday, France started at a frenetic pace and never let up against a dispirited Ukraine that played most of the second half with 10 men.
France was already leading 2-0 by then after Mamadou Sakho scored his first international goal midway through the first half and Karim Benzema added a close-range finish in the 34th.
"I've experienced some great moments but this one is special. It's fabulous, especially after the first game and the bad result we got there," France coach Didier Deschamps said. "The players should get all the credit because they did something special."
Ukraine went down to 10 men when fullback Yevhen Khacheridi was red-carded for fouling Franck Ribery in the 47th minute. France sealed qualification in the 72nd when Ukraine subsitute Oleg Gusev turned a cross into his own net under pressure from Sakho.
"We should have worked harder and been more organized," Ukraine coach Mykhailo Fomenko said. "I warned my players before the match to avoid the yellow and red cards but this was very difficult."
There were delirious scenes at the end as France players rushed off the bench to celebrate.
Bullied all night in Kyiv last Friday, the French responded brilliantly in a performance full of bravery, panache and determination.
"It's the magic of football. Four days ago we were bad, very bad," Deschamps said. "Tonight the players were present and I had no doubt they would be."
The players, under intense pressure in the build-up to the game, grabbed flags and sprinted around the field in jubilation as France avoided the embarrassment of failing to qualify for a major tournament for the first time in 20 years.
"It's been a very long time since we saw the Stade de France like this," Ribery said. "We took a big slap in Ukraine and we woke up. We were stuck together until the end and we showed it on the pitch."
Olivier Giroud grabbed a microphone and got the crowd singing along to the national anthem as pent-up emotions were well and truly released.
"We've suffered so much, there's been so much sadness," Ribery said. "This is wonderful, magnificent."
In a match four years ago, 10,000 travelling Irish fans drowned out the home support. But there was no danger of that this time from Ukraine's considerably smaller following.
Pre-match footage on the stadium's big screen showed clips of glory days: the Platini years, the 1998 World Cup and Euro 2000. Perhaps this was an attempt to jog the crowd's memory, a last-ditch plea to get them to rally behind the team. Or perhaps it was a simpler message: "This is how to win, remember?"
The words to "La Marseillaise" then popped up on the screen, offering further encouragement to show their support.
It seemed to have the desired effect as France poured forward and had Ukraine firmly on the back foot from the outset, with Mathieu Valbuena going close with a rising shot and Paul Pogba and Benzema heading over from good positions.
Piatov had kept eight consecutive clean sheets but his resistance was finally broken when Sakho pounced to turn the ball in from close range after Piatov pushed away Ribery's shot from the edge of the penalty area. The way Sakho sprinted to the bench, thumping his chest with pride, showed just how intense the strain had been on the French since Friday.
Some of the tackling was ferocious, as this time France stood up to the physical challenge after their battering in Kyiv.
"I know the French team is very strong and can play at a very high level. They were playing at home and their fans were very good," Fomenko said. "I regret a few things. We weren't good psychologically. We needed to be ready and I don't think we were."
Piatov was well beaten for the second goal when Cabaye's attempted shot deflected favourably into the path of Benzema and he stroked it into the bottom corner.
Moments before halftime, Sakho stretched his leg high to poke the ball away from Roman Zozulya as he was about to shoot and, from the resulting corner, Andriy Yarmolenko's goal-bound hit Mathieu Debuchy's chest.
The French bench rose in unison when Gusev turned a cross into his own net and substitute Giroud almost made it 4-0 but his point-blank header was superbly saved.
AP Sports Writer John Leicester in Paris contributed to this report.Suggest a correction