The local government said the accident occurred in Ningjin County's Dongwang Township.
The explosion was so powerful that it shattered nearly all glass windows at a residential building close to the factory.
A flour factory about a kilometre away from the warehouse had its windows broken, state-run Xinhua news agency reported.
Bloodstains were also spotted at the entry of a garment factory nearby.
The explosion wounded more than 12 people.
Authorities have deployed heavy machinery for search and rescue. The cause of the blast was not ascertained yet but investigators were looking into the possible reasons.