Val Hughes, spokeswoman for the Inkster school district, said the principal at Daly Elementary School was tipped by a phone call before school started Friday morning. Hughes said the principal met the boy at the school's entrance.
The boy and weapon were removed from school grounds around 9 a.m. Hughes said no one was harmed and that other students weren't aware of what happened.
No details were released about how the boy got the gun or why he took it to school.
Inkster police said they couldn't release any information about the incident.