A Fourth Precinct officer stopped a 1995 Lincoln sedan after seeing it cross the center divider on Route 25 in Smithtown, east of Southern Boulevard, at 11:40 a.m., police said.
Passenger Paul Lucente, 30, took off without his child, police said.
Police said they found heroin in the car.
"The guy panicked and ran," said Fourth Precinct Det. Sgt. Frank Catalina.
A few hours later, Lucente surrendered by calling police from his home, where they arrested him, Catalina said.
The boy's maternal grandfather, Orlando Catapano of Kings Park, picked him up after someone the family knew contacted them.
When Catapano arrived, the youngster was thumbing a video game, but at home with his grandparents, he alternated between "bouncing around" and crying secretly in his room, said his grandparents, who take care of him.
"He saw his father run away from police, and he was crying but he wouldn't let anybody know that," Catapano said.
Paul Lucente Sr. of Smithtown voiced disappointment with his son: "I'm very upset. I can't believe he would do such a thing."
The driver, Benjamin Laudonio, 26, of Stony Brook, was high on drugs and had a suspended license, police said.
Lucente and Laudonio were both charged with endangering the welfare of a child and seventh-degree criminal possession of a controlled substance.
Laudonio was also charged with aggravated DWI with a child less than 16 years old, a felony under the state's Child Passenger Protection Act, known as Leandra's Law; operating a motor vehicle impaired by drugs; and third-degree aggravated unlicensed operation.
The two men are to be arraigned Tuesday at First District Court in Central Islip. Detectives ask anyone with information to call 631-854-8452.
Catapano said the boy's mother, Brittney Williams, has been at a rehabilitation center with brain and other injuries since being hit twice by a car just before Christmas. She had been walking back home with her son and baby daughter after taking them to visit their father.
"It's been tragedy over tragedy," Catapano said.