The boy, whose name was not reported, ran away from RiverEast Elementary and Secondary School at about 10:20 a.m. Tuesday, the St. Paul (Minn.) Pioneer Press reported.
At about 11 a.m., David Bergstrom of St. Paul spotted the boy on top of a garbage truck.
"I thought at first it was his [the driver's] kid, and they were playing around, and all of a sudden it clicked: That's not right," Bergstrom said.
Bergstrom flagged down the truck driver, who pulled over and Bergstrom told him a child was on top of his truck.
"He had no idea the kid was up there," Bergstrom said. "He was shocked."
The driver climbed on top of his truck and coaxed the boy into coming down.
A nearby resident called police and allowed the boy to stay in his house until police arrived.
Police Sgt. Paul Paulos said the boy is a participant in Project Lifesaver, which equips people who have Alzheimer's disease, autism, Down syndrome or dementia with a wrist or ankle band that continuously emits a tracking signal, and that police had been tracking him.
The boy was returned to his school, said Toya Stewart Downey, St. Paul Public Schools spokeswoman.