Spanish Police have reported that the, Abou, was found inside the case being carried by a 19-year-old woman into Ceuta, a Spanish enclave on Thursday.
When police opened the case, they found the boy in a “terrible state”, a spokesman for the Guardia Civil told AFP.
The boy, from Ivory Coast, is now in the care of authorities in Ceuta.
The Spanish newspaper El Pais reported that the 19 year woman is not related to the boy and was paid by his father to carry the suitcase.
The boy’s father lives in the Canary Islands and had hoped to be reunited with his son, El Pais said.
The Spanish news agency Efe said the boy’s father, also named Abou, had travelled back to Ivory Coast to pick him up, having moved to Gran Canaria in 2013.
The father then reportedly paid the courier to carry the suitcase. A police spokesman told Efe: “She seemed to hesitate, and it looked as though she didn’t want to come through the border.
“At first we thought that there could be drug packages, but gradually discovered that it was a human body.”
The boy’s father travelled across the border an hour-and-a-half after his son. At that point, Efe said, he was detained by border guards.
Ceuta and another Spanish enclave, Melilla, sit on Morocco’s Mediterranean coast, and are each surrounded on three sides by Morocco.
Madrid says they are integral parts of Spain and manages their borders, but Morocco claims sovereignty over the territories.
Despite being surrounded by six-metre-high fences, the enclaves have proved to be popular areas for migrants to try to cross into Europe from Africa.
Human Rights Watch says that at least 4,300 people entered Ceuta and Melilla illegally in 2013, compared to 2,804 the year before.
In February last year, hundreds of migrants stormed the fence in Melilla in one day and around 100 managing to make it into the enclave.