Several people were reported missing but Quebec provincial police Lt. Michel Brunet said it was too early to say if there are any casualties in the town of Lac-Megantic (Lack-MAH-Gan-Tic), about 155 miles (250 kilometres) east of Montreal.
The explosions ignited a blaze that sent flames shooting into the sky, and billowing smoke could be seen from several miles (kilometres) away hours after the derailment.
Some of the train's 73 cars exploded and the fire spread to a number of homes in the lakeside town of 6,000 people, which is close to the border with Maine and Vermont.
"When you see the centre of your town almost destroyed, you'll understand that we're asking ourselves how we are going to get through this event," an emotional Mayor Colette Roy-Laroche told a televised news briefing.
Prime Minister Stephen Harper tweeted: "Thoughts & prayers are with those impacted in Lac Megantic. Horrible news."
The cause of the derailment was not immediately known.
Authorities set up perimeters as firefighters battled to control the fire, and worried residents looked on amid fears that some of their friends and loved ones may have died in their homes
"We're told some people are missing but they may just be out of town or on vacation," Brunet told a news conference.
Lac-Megantic resident Claude Bedard described the scene of the explosions as "dreadful."
"It's terrible," Bedard said. "We've never seen anything like it. The Metro store, Dollarama, everything that was there is gone."
Bernard Demers, who owns a local restaurant, had to evacuate his home after the derailment.
"Early this morning (there was) a big explosion like an atomic bomb," he said. "It was very hot. ... Everybody was afraid."
Environment Quebec spokesman Christian Blanchette said a large but undetermined amount of fuel had also spilled into the Chaudiere (Ah-DER-Re) River. Blanchette said the 73 cars were filled with crude oil, and at least four were damaged by the explosions and fire.
"Right now, there is big smoke in the air, so we have a mobile laboratory here to monitor the quality of the air," Blanchette said.
"We also have a spill on the lake and the river that is concerning us. We have advised the local municipalities downstream to be careful if they take their water from the Chaudiere River."
Firefighters and rescue workers from several neighboring municipalities, including Sherbrooke and Saint-Georges-de-Beauce, were called in to help deal with the disaster.
Firefighters from northern Maine were also deployed to the Quebec town, according to a spokesman at the sheriff's office in Franklin County. The town is about 135 miles (217 kilometers) north of the Maine border.
The train, reportedly heading toward Maine, belongs to Montreal Maine & Atlantic. According to the railroad's website, the company owns more than 500 miles (800 kilometers) of track serving Maine, Vermont, Quebec and New Brunswick.
Last week a train carrying petroleum products derailed in Calgary, Alberta, when a flood-damaged bridge sagged toward the still-swollen Bow River. The derailed rail cars were removed without spilling their cargo.