The border police officer struck the migrant while escorting him into a hearing in a retention centre near the Channel port of Calais.
A court clerk witnessed the blow and reported it.
His lawyer, Antoine Deguines, claimed he did not mean to hit the migrant but was protecting himself because the man was excited and kept standing up, leading to fear that he would headbutt him.
Prosecutors pointed out that the victim had been handcuffed at the time.
The court sentenced the police officer, who is in his 40s, to six months in prison and banned him from bearing a weapon for five years.
He was also given a suspended two-year ban on employment in the public service.
He will also now have to serve a previous four-month suspended sentence imposed for violence on his partner.
Gendarme runs over pedestrian
In Dijon on Thursday a gendarme who ran over and killed a pedestrian was charged with manslaughter and banned from driving.
The 20-year-old allegedly lost control of his vehicle after it hit the pavement, causing it to hit a tree and then the 53-year-old victim.
Tests for drugs and alcohol proved negative.