During a routine examination, an inspector probed the siding of one suitcase and discovered a powder that later tested positive for heroin.
Officials said they believe the child's mother, who they said has a history of drug problems, dropped the child off in Bogota.
The girl's grandmother was at Kennedy to pick her up, but investigators said they don't believe the older woman knew about the drugs.
The 5-year-old was taken into custody by the New York City Administration for Children's Services, and placed with a foster family.
Children's Services spokesman McLean Guthrie said the girl is "fine, with no signs of any health problems."
Youngest Drug Mule?
No charges have been filed in the case, but Customs officials said the investigation into who is responsible is continuing.
Investigators said they have had numerous cases of minors knowingly and unknowingly trafficking drugs, but they believe this is the youngest case ever.
"This is certainly the youngest drug courier that we have encountered traveling alone into New York, and it may very well be the youngest that we have ever encountered," said Customs spokesman Dean Boyd. "Historically we have seen drug trafficking organizations use minors to carry narcotics, but we typically do not see minors this young."