A plume of thick black smoke could be seen many miles away and explosions were heard.
No injuries were reported, but officials are urging people from the nearby town of Casselton – some 2,300 people – to evacuate as a precaution.
An investigation into the incident has been launched.
A spokeswoman for the North Dakota Department of Emergency Services said the last 50 wagons of the train had been uncoupled, but another 56 remained at risk.
The derailment, after a collision involving another goods train, is reported to have happened near an ethanol plant.
Emergency and fire-fighting crews have been sent to the scene.
Cass County sheriff’s office said it was “strongly recommending” that residents in parts of Casselton and anyone living five miles to the south and east evacuate.
Officials have said a change in weather patterns could expose residents to smoke and possible health hazards.
Residents within 10 miles of the scene are being asked to stay indoors.
A shelter for those evacuated has been set up in Fargo, about 25 miles away.
Correspondents say it is the latest in a string of incidents that have raised alarm about a rise in crude oil traffic on the railways.
In July, a train carrying oil from the Bakken oil region in North Dakota derailed near the Canadian town of Lac Megantic, killing more than 40 people.
EFUAxRxeDuAQuincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…
Misleading allegations, rumours and outright lies about voting and fraud are flooding online spaces in…
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…