The forward has also received a €700 fine and seen his driving licence revoked for three years after an accident in France at the beginning of February
The forward, currently on loan at Montpellier, was taken into custody after crashing his Ferrari while under a suspension from driving, although the 19-year-old denied he was at the wheel of the vehicle.
Witnesses claimed Niang struck several other cars after losing control of his own before he fled the scene, and he risked a prison sentence of up to five years and a heavy fine had he been found guilty of serious driving offences.
However, a judge at the criminal court in Montpellier instead handed him an 18-month suspended custodial sentence and a fine of €700 - €500 for failing to control his vehicle, €100 for speeding and a further €100 for failing to stop at a red light - as well as a ban from driving for three years and 170 hours of community service.
The prosecutor had initially asked for Niang to be given community service and the annulment of his driving licence, rather than a prison term.
"At the time, I was overcome with panic. I'm sorry, it was completely stupid," Niang was quoted as saying by Maxifoot prior to the criminal proceedings.
Niang, who has made 10 appearances for Montpellier since completing his loan move from the Rossoneri, was warned by club president Louis Nicollin over his off-the-pitch conduct in future following the incident.