Cedric Herrou, an olive farmer in southern France who helped about 200 migrants cross the border from Italy, was given a four-month suspended sentence in August 2017.
He had brought the destitute migrants home and set up a camp for them. He was also convicted of sheltering some 50 Eritreans in a disused railway building.
France's Constitutional Council later said Herrou's actions were not a crime under the “principle of fraternity” as enshrined in France's motto “Liberty, Egality, Fraternity.”
The council, which evaluates the validity of French laws, ruled that people cannot be prosecuted for “crimes of solidarity”.
In December 2018, the Cour de Cassation – France's court of final appeal – overturned Herrou's conviction and sent the case back to the appeals court in the city of Lyon which on Wednesday voided all charges.
“Reason and the law has triumphed,” said Sabrina Goldman, a lawyer on the case.
“Why focus on someone who did nothing but help? How can what he did be regarded as anything other than a humanitarian act?”
Rights body Amnesty International said the ruling will have implications throughout Europe for the criminalisation of “acts of solidarity”.
“Cedric Herrou did nothing wrong, he simply showed compassion towards people abandoned in dire conditions by European states,” Amnesty's Rym Khadhraoui said in a statement.
“Whilst it is a relief that Cedric Herrou's ordeal is now over, he should never have been charged in the first place.”
French law should now be amended to ensure only people smuggling, which entails a material benefit, is regarded as an offence, and not humanitarian assistance, Khadhraoui added.