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.
EFUAxRxeDuAAt least five people, including a four-month-old baby, have been killed after dozens of tornadoes…
Harvey Weinstein has been hospitalized just days after his 2020 rape conviction in New York…
Hamas has published a video showing the first proof of life of US and Israeli…
Prosecutors and Donald Trump’s attorneys delivered opening statements and the first witness was called on…
The House of Representatives has finally approved $61 billion in new US military aid for…
The real estate market in the United States has always been a gauge for economic…