The authorities said the child, whose name was withheld, had travelled alone from Bogota with the Colombian national airline, Avancia, after being put on the plane by her mother.
Her grandmother arrived to meet her at the airport, but a spokeswoman for New York's child services department said she was not aware that her granddaughter would be carrying the drugs.
The stash was discovered during a routine examination of her luggage.
The case has left New York's battle-hardened customs investigators shocked.
"Sending a five-year-old girl alone on a plane to smuggle heroin represents a new low, even for drug traffickers," New York's chief customs service agent, Joe Webber, said in a statement.
A spokesman for the department, Dean Boyd, said: "We believe this is the youngest courier travelling alone ever encountered by US customs in New York, and may well be the youngest customs has ever encountered."
The seizure, which took place last Thursday but only came to light yesterday, happened eight days after the arrest of a 12-year-old American boy.
Prince Nnaedozie Umegbolu had flown to New York from Lagos after swallowing 87 condoms filled with heroin in return for a payment of $1,900 (£1,300).
He asked to be taken to the police after becoming sick on a taxi ride from the airport, and has since been charged with possession of a controlled substance.
A 13-year-old and a 15-year-old girl were arrested within days of each other at Manchester airport this month, both carrying heroin in their luggage.