Allegheny Power arrived on the scene shortly before 11 p.m.
The brick building consisted of 12 apartments, and all of the residents of the building were displaced, Miller said.
Christina Lamm, 18, who lives in a first-floor apartment at the building, said lightning struck at the beginning of the storm.
"My boyfriend's sister felt a shock through the computer," Lamm said.
Lamm then heard an alarm and went into the hallway. At that point, everybody was running outside the building, she said.
Lamm said the roof collapsed after the fire started. She did not see anybody who was seriously injured.
Lamm had not been told where she was going to be staying as of 10:30 p.m.
"I have a lot of expensive stuff in there," she said.
David Phelps, 44, who lives on the second floor, also escaped the fire.
"It was one big flash of lightning," Phelps said. "It was unbelievable."
Phelps said there was only one way out of the building, and there was heavy smoke.
"Outside, it was pitch black with smoke," he said.
Lightning began to be seen in Hagerstown around 9 p.m., with heavy rain starting shortly after that.
The storm ended about 10 p.m., with about 1.64 inches of rain falling, according to i4weather.net, the Web site of Hagerstown weather observer Greg Keefer.
The rainfall amount was the most for a single day in Hagerstown since June 29, when 0.66 inches of rain fell, according to Keefer's Web site. Before Saturday night's storm, only 0.28 inches of rain had fallen in Hagerstown this month, according to the Web site.
Washington County emergency personnel also responded to power outages and reports of alarms going off at buildings during the storm.
No further information was available at press time.
Herald-Mail editor Tim Shea contributed to this story.