Prosecutors had wanted Ali Ouattara to go to prison for facilitating his son's illegal entry into Spain.
However this was changed to a small fine when they conceded they had found no evidence the father knew his son would be trafficked in a suitcase.
"Neither my father nor I knew that they were going to put me in a suitcase," the boy Adou, now 10, told judges.
Adou said Mr Ouattara, who spent a month in prison, had always told him the journey would be made by car.
Adou said he had found it difficult to breathe whilst in the suitcase, which was used in his attempt to cross the border between Morocco and the Spanish enclave of Ceuta.
In May 2015, officials at the border crossing between Morocco and Ceuta stopped a young woman dragging a heavy suitcase.
When they scanned the bag, they saw the silhouette of a child crouched in a foetal position.
Mr Ouattara was ordered to pay a €92 ($114; £81) fine.
The boy now lives with his mother in a Parisian suburb, but travelled to Ceuta to testify.
"It's all over and we can begin to resume out lives, together: my wife, my daughter my son and I," Mr Ouattara said, revealing the family would start a new life in northern Spain.