The body was found as a plumber investigated a foul odor noticed by cafeteria staff earlier in the day, said Roosevelt School District Superintendent Mark Dowling.
Police think the man tried to break into the Sierra Vista Elementary School, where he was discovered Friday in an air conditioning duct on the school's roof.
Authorities think the man tried to climb through the duct, got stuck, and died. It wasn't known how long the body was there.
"Obviously because of the smell, there are indications that he had been there for some time," said Sgt. Andy Hill, a Phoenix police spokesman.
The man's name wasn't released.
The school was immediately placed on lockdown and parents were notified. School officials said at no point were the students in danger.
Police Detective Cindy Scott said in an e-mailed statement that the adult was "not related to the school" but offered no elaboration.
Dowling said the children were scheduled to be dismissed early Friday and that some parents were already on their way when the school notified parents about the discovery.
The school has about 550 students in preschool through eighth grade.
David Torres, who arrived at the school at midday to pick up his two sons, said he was surprised to see police and TV helicopters when he arrived.
"I was thinking something real bad had happened," said Torres, who was leaving with his boys. "I got nervous and I started to look for my kids."
Elisea Limones said she was shopping across the street from the school, where two of her nephews are students, when she saw the commotion.
"I was scared, I was frightened, of course," she said. "I didn't know if any of the kids were harmed."
Limones picked up her nephews — a third- and a sixth-grader.
A psychologist will be at the school when it reopens Tuesday, Dowling said.