At least 26 of the train's more than 100 cars veered off the tracks, the West Virginia Department of Military Affairs and Public Safety said, and at least 19 of the derailed cars caught fire.
One home was destroyed, and one person was injured, agency spokesman Lawrence Messina said.
Complicating matters, oil from the CSX train spilled into the Kanawha River, a source of drinking water in Kanawha and Fayette counties. Even parts of the river caught fire amid the explosions, Messina said.
At least two water treatment plants shut down Monday night as officials investigate how much oil may have spilled into the river, CNN affiliate WSAZ
said. About 2,000 people were at risk of losing water service. But Tuesday afternoon officials said testing showed no crude near a water intake valve near one plant. WSAZ reported the intake was 3 miles downstream from the spill.
West Virginia American Water told its customers to boil water before using it, the company said in an online statement.
"The boil water advisory is being issued as part of the process of restarting the (Montgomery) treatment plant and restoring full service," the company said.
It may take a day or two before water service restarts, WSAZ reported, depending on the elevation of a customer's property.
Gov. Earl Ray Tomblin issued a state of emergency for Kanawha and Fayette counties.
About 100 to 125 people have been displaced after the accident, according to an afternoon update from the West Virginia public safety department.
The heat from the flames was so intense Monday night that crews couldn't get closer to investigate until at least Tuesday, WSAZ said.
Some train cars exploded at unpredictable intervals, shocking residents with each deafening blast.
"We were standing down by the river bank when we saw the train explode -- or a car explode -- and it shot up a mushroom cloud," witness Alex Fandor told CNN affiliate WSAZ
As he spoke, another loud explosion sent a colossal fireball into the sky.
The blasts continued even 10 hours after the derailment. The biggest explosion took place around midnight, Montgomery volunteer firefighter John McGinnis said early Tuesday morning.
Messina said it's not clear what caused the derailment.
"We've had some severe winter weather conditions here with significant snowfall," he said. "We don't yet know whether that's a factor in this."