The child was detected as the suitcase was passed through the scanner at noon on Thursday at El Tarajal on Ceuta's border with Morocco.
He was clearly seen by customs officers curled up inside the case.
"When they put the suitcase through the scanner, the operator noticed something strange, which seemed to be a person inside the case," a spokesman from the Civil Guard police force said.
"When it was opened they found a minor, in a terrible state."
When customs officers opened the case he climbed out and said his name was Abou and that he was eight-years-old.
The woman carrying the case was a 19-year-old Moroccan. Civil Guard later said that they had located a woman from Ivory Coast, with a temporary residents permit in the Canary Islands, who admitted she was the mother of the child and had been waiting to collect him.
The child was taken into the care of social services while the mother and the woman who was attempting to bring in the case have both been arrested.