The driver of the commercial truck was hospitalized in serious but stable condition and the two people aboard the 15-car CSX freight train escaped injury, authorities said.
The train damaged buildings in Rosedale, northeast of Baltimore, and the explosion shattered windows but there were no other reports of property damage, The Baltimore Sun reported.
Elise Armacost, a spokeswoman for Baltimore County, said although smoke from the fire did not contain toxic inhalants, a 20-block area was evacuated.
Baltimore County Fire Chief John J. Hohman said the evacuation would have been "much more significant if there were toxic chemicals."
Hohman said the fire was likely to burn through the night.
The National Transportation Safety Board said it would send a team including rail and hazmat investigators to the scene.
Maryland Transit Administration officials said service on the Penn Line -- running between Baltimore and Perryville, in the northeastern part of Maryland, would not be disrupted, the newspaper reported. Minor disruption could affect CSX's Camden Line between Washington and Baltimore.
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'