The Canadian Coast Guard has evacuated 16 people from a burning container ship that is expelling toxic gas off Canada's Pacific west coast.

However, the authorities said there is "no safety risk" to those on shore.

The Zim Kingston ship had been bound for Vancouver when the flames erupted, with the fire reported to the coast guard at around 11pm local time last night, CBC News reported.

"The ship is on fire and expelling toxic gas," the coast guard said in a navigational warning on its website, adding that the vessel remains anchored off the coast of British Columbia.

Later, a statement on the coast guard's Twitter account said 16 people had been evacuated from the Zim Kingston "after a fire broke out in ten containers".

"The fire remains a dynamic event and an Incident Command Post has been set up to manage the situation. Responders are mobilising to both fight the fire and recover the containers that broke away from the ship on Friday," the statement said.

"An Emergency Zone has been set up for 1NM (one nautical mile) around the ship while fire fighting operations are underway.

"Currently there is no safety risk to people on shore, however the situation will continue to be monitored," the tweet said.

It is unclear what caused the blaze.

The coast guard said the ship is carrying more than 52,000kg of chemicals located in two of the containers that are on fire, according to CBC News.