Les Bleus put a dismal showing in Kiev on Friday behind them and won 3-0 back home at the Stade de France.
First-half goals from Mamadou Sakho and Karim Benzema levelled the tie and, after Ukraine's Yevhen Khacheridi was sent off, Oleg Gusev's unfortunate own goal completed the turnaround.
Deschamps told TF1: "It's the magic of football.
"Four days ago we were bad, very bad, but the players responded well. Tonight [Tuesday] we played very well.
"It was very important for French football that we are in Brazil next summer. We will be there, that is very good.
"We were up against a good team and we showed a lot of heart and enthusiasm. When you have these basic ingredients, you can achieve good things."
Liverpool defender Sakho - who also tried optimistically to claim the third goal - added: "I am happy. The team spirit was there.
"My first (sic) goal gave us hope and we were all together in the dressing room, you need that collective spirit.
"We also have to acknowledge the fans who cheered us on. All the French public were behind the team."