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.

During July - the first full month after the Brexit vote - 60,912 new mortgages were approved.
That was down from 64,152 approvals in June, and was the lowest total since January 2015.
The total amount lent out for house purchases was £10.4bn, down from £11.1bn in June.
The figures also show a 12.4% drop in the number of mortgage approvals on the same month a year ago.
The number of approvals has been falling steadily since March, when there was a rush to buy ahead of tax changes.
"Mortgage approvals for house purchases have progressively slowed after being buoyed in the first quarter by buy-to-let and second home sectors rushing to beat April's Stamp Duty increase for these sectors," said Howard Archer, chief UK and European economist at IHS Global Insight.
"It is also highly possible that mortgage activity was hit in July by heightened uncertainty following June's vote for Brexit."
The Bank of England figures also show that growth in the amount being borrowed by consumers on credit cards and other loans eased off in July.
UK residents borrowed an extra £1.2bn during the month - down from £1.9bn in June, and 17% less than in July 2015.
This is the first time that growth in unsecured consumer credit has slowed since December 2014.
However, credit card lending by itself rose by £0.5bn in July to a record of £65.5bn.
"We remain concerned that while most households will be able to handle this extra borrowing, a minority of households could find themselves exposed to financial difficulty," said Joanna Elson, chief executive of the Money Advice Trust.
Where can I afford to live?

The FTSE 100 index was down 73.57 at 6,112.02 points.
Mining companies saw some of the biggest falls as the price of metals declined.
The biggest faller on the FTSE 100 was mining giant Rangold, whose shares lost 11%. Fellow BHP Billiton, was down 6%, with its shares also being affected by news of a lawsuit in Brazil.
Federal prosecutors in Brazil have filed a $43.5bn (£30bn) civil lawsuit against iron miner Samarco and its owners BHP and Vale, over the collapse of a dam last year that killed 19 people.
Shares in Sainsbury's  extended losses throughout the afternoon to lose 6% after the supermarket reported a fall in underlying full-year profits.
Profits fell to £587m from £681m in the previous year as the supermarket price war continued to have an impact.
Shares in rivals Tesco and Morrisons were also lower, with Tesco down 5% and Morrisons 1.7%, as research from Kantar Worldpanel indicated that all the big four supermarkets had lost market share in the 12 weeks to 24 April.
Next shares rose 3.5% despite the retailer cutting its full-year sales and profit forecasts on fears of a slowdown in consumer spending.
On the currency markets, the pound slipped 0.4% against the dollar to $1.4478, and was 0.3% lower  against the euro at €1.2593.

The office in Cowbridge Road has been closed with a note placed on the window advising claimants and jobseekers where to go instead.
The Department for Work and Pensions (DWP) confirmed the incident.
A Public and Commercial Services union spokesman has claimed several workers had oxygen therapy after a suspected carbon monoxide leak.
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.
[NEXT_CONCEPT]
The number of mortgages being approved by banks and building societies is at its lowest for a year and a half, according to Bank of England figures.
[NEXT_CONCEPT]
(Close): London's top share index closed down 1.2% as mining and supermarket shares fell.
[NEXT_CONCEPT]
Some members of staff at a Jobcentre in Cardiff have been sent to hospital following a gas leak.