Firefighters took more than three hours to douse the blaze in Balaghat district on Wednesday evening.
Senior local official Bharat Yadav said the exact cause of fire was not known, but suspected that "someone might have thrown a burning beedi (cigarette)".
Accidental explosions are common at Indian fireworks factories.
Mr Yadav told PTI news agency that the rescue operation was over, and nobody was trapped inside the factory.
"Of the seven injured, five have been rushed to Nagpur [in Maharashtra] for treatment, while two are being treated at a hospital in the district," he said.
Chief Minister Shivraj Singh Chouhan has announced a compensation of 200,000 rupees (Â£2,396; $3,104) to each the families of each victim. He said the government would also pay for the medical expenses of the injured.
At least 23 people have died and seven others were injured in a massive explosion at a fireworks factory in the central Indian state of Madhya Pradesh.