The fire started around 2 p.m. on Saturday in the Hôtel-Dieu hospital. It is believed to have started in a laboratory.
Witnesses told Radio-Canada that shortly after the fire began, there was an explosion in the building.
All patients were evacuated, except for some in the geriatric unit, which is housed in an independent wing, outside of the main building.
Seriously ill patients were taken to the Hôtel-Dieu in Lévis and the hospital in La Pocatière.
"This was a serious evacuation," said Mireille Gaudreault, spokeswoman for the health department. "There were people who were bedridden, others who were able to move, others not at all. But it went very well."
Sixty firefighters from Montmagny and surrounding municipalities were called to the scene.
According to the executive director of the City of Montmagny, Bernard Létouneau, thorough checks were done to make sure fire couldn't spread through the ventaliation system.
Radio-Canada is reporting that it's still too early to determine the cost of the fire.