He said he could not identify the boy or his family.
Firefighters found heavy fire and smoke when they got to 614-616 W. Washington St., near the intersection of Washington Avenue, at about 12:50 p.m. on Friday.
DeHaven said five apartments at 614-616 W. Washington St. were significantly damaged. Four of those apartments were occupied.
The roof and attic at 610-612 W. Washington St., an apartment building next door, also were damaged as the fire spread.
Some people gathered at the scene said they saw a bright flash and a loud bang right before the fire started. They wondered if lightning was the cause.
One occupant and two firefighters were treated at Washington County Hospital for injuries and heat exposure, then released, according to DeHaven.
DeHaven said there was no insurance estimate yet of the damage to the apartment building, which is owned by Iris Sagi of Valley Properties.
Sagi could not be reached for comment Wednesday.
DeHaven said other people were in the apartment with the boy. It was not clear how long he might have been playing unsupervised.
A person who was not in the building spotted the fire and alerted people inside.
DeHaven said occupants tried to put out the fire, but failed, so they got out and called 911.
The center room of the apartment, where the fire started, had a working smoke alarm, DeHaven said.
The city of Hagerstown's fire companies were assisted by fire companies from Halfway, Maugansville, Longmeadow, Funkstown and Clear Spring.
Ambulance units from Community Rescue Service, Halfway and Smithsburg also helped, along with Washington County's air unit, rehab unit and special operations team.
Firefighters stayed at the scene for close to five hours.