The first 45 minutes at Stade de la Meinau failed to produce any goal but the second half witnessed three.
Jean Aholou and Jeremy Blayac scored in the 65th and 69th minutes to hand the hosts a two-goal lead. But Niane’s injury-time goal was not enough for the visitors as they lost 2-1.
The Mali forward has now scored five goals in 21 games this season. The 24-year-old netted 23 times in the Ligue 2 last term to help his side secure top-flight promotion.
And with Jean-Louis Garcia's side struggling in the Ligue 1, the former Nantes striker will be hoping to score more goals to help his 19th-placed team.
Troyes welcome Metz to Stade de l'Aube for their next league encounter billed for February 17.