Upper Darby police say the boy's crying drew the attention of commuters at the 69th Street Terminal on Sunday afternoon. Travelers alerted police, who were led to 29-year-old Adam Pugliese by the upset boy.
Officials say Pugliese, of Pottstown, was unconscious on the floor with a needle in his arm after overdosing on heroin.
Police Superintendent Michael Chitwood says paramedics revived Pugliese and he was arraigned on endangerment and drug charges after being released from a hospital.
Pugliese was unable to post bail. It was not clear if he had an attorney.