Two late Valenciennes goals confirmed Troyes' relegation to Ligue 2.
Troyes came into the contest on the back of three successive wins but still needed a win against VA allied to a defeat for Sochaux at Bastia to survive.
Sochaux did just enough in a goalless draw to secure their top-flight status, but for much of the night their future was on a knife-edge after Troyes took an early lead through Benjamin Nivet.
Troyes held the lead until 20 minutes from time when Benjamin Angoua levelled, and the visitors' hopes were firmly doused three minutes from the end when Gregory Pujol fired home.
Eleven minutes were on the clock when Troyes went in front, Florian Jarjat's cross from the right reaching Nivet, who sent a controlled low finish beyond Nicolas Penneteau.
David Ducourtioux headed against the post as VA went in search of an equaliser before the break, while the hosts' luck was also out in the 55th minute when Vincent Aboubakar teed up Remi Gomis for a shot that came back off the bar.
Troyes had ridden their luck and it came as little surprise when Valenciennes finally broke through their defences in the 70th minute, Maor Melikson's corner headed home by Angoua via a slight deflection off Jarjat.
With three minutes left VA made sure of the points as Gael Danic crossed for Pujol to bundle the ball home, as Troyes' time in Ligue 1 was brought to an end after just one season.