The original fire, which began in a silo at James Jones and Sons' sawmill in Greyshop Industrial Estate in Forres, was still being tackled by crews when there was an explosion thought to have been caused by dust.
A 59-year-old man employed at the sawmill was airlifted to Aberdeen Royal Infirmary by helicopter with serious injuries. He was said to be in a stable condition last night.
Meanwhile, two firefighters were taken to Raigmore Hospital in Inverness suffering from burns and a third received minor burns. Three other men were taken to hospital for treatment.
Police confirmed there would be a joint investigation involving the Scottish Fire and Rescue Service (SFRS) and the Health and Safety Executive, and said it was too early to speculate on the cause.
SFRS's Assistant Chief Officer Robert Scott said: "Clearly there will be a full investigation into this, but the reality is that if it was sawdust and dust within a silo, the likelihood is it was some kind of dust explosion."
The fire began in a silo containing sawdust silo and firefighters were called at 8am.
Three fire appliances, two from Forres and one from Elgin, were sent to the scene to tackle the fire.
A fire service statement said: "Firefighters in breathing apparatus used one hose reel jet and one main jet. Whilst firefighters were removing the contents of the silo an explosion occurred, injuring three firefighters and four members of staff from the site."
It is understood the explosion happened at around 10.30am.
The Scottish Ambulance Service sent four ambulances, a helicopter, a special operations team, two officers and two doctors.
Councillor George Alexander, who represents Forres on the Moray Council, said he had spoken to a local business owner who had witnessed the explosion.
Mr Alexander said: "I understand there was a smouldering fire in a storage bin for the sawdust. It had been put out and the bottom of the tower had been removed in order to let the stuff come out. The employees were shovelling the sawdust from the tower into skips when there must have been a sudden rush of oxygen and the explosion took place - blowing people right off their feet.
"It really has just been an unfortunate incident where the firemen obviously thought the situation was under control and this sudden dust explosion caught them unaware. It was totally unexpected."
Superintendent Mark Cooper, of Police Scotland's Moray Division, said all those at the scene of the fire would be interviewed, including the fire-fighters who were there when the explosion occurred.
An SFRS spokesman said two firefighters, both aged 47, had been taken to Raigmore Hospital in Inverness with burns injuries. A third firefighter who received minor burns did not require further treatment.
A 20-year-old man was also taken to Raigmore for treatment. Two men aged 62 and 24 were taken to Dr Gray's Hospital in Elgin with burns.
Crews remained at the scene of the incident and were expected to remain for several hours, ensuring the fire did not flare up again.
James Jones and Sons is one of Scotland's largest independent sawmillers and among the top suppliers of British timber in the UK.
It is one of the bigger employers in Moray. Expansion plans agreed last year secured 54 jobs at the plant, which makes "I" beams - timber engineering products destined for the UK's house building sector.