Thirty firefighters were called to a fire at the Cadbury factory in Birmingham. Six fire engines attended the scene in Bourneville at about 0630 GMT on Tuesday.
It involved a shrink wrapping machine on the fifth floor of the six storey building.
Alan Rotchell, divisional fire officer, said thick smoke in the building made it difficult for firefighters to tackle the fire.
"The fire has been extinguished but the building was heavily smoke-logged," he said.
"The building did have to be evacuated but it is not known how many workers were in the building at the time."
He said no one was injured and they did not believe the fire was suspicious.