The farmers died in Mandsaur after shots were fired during their protest to demand loan waivers and better prices for their produce.
Protesters accused the police of opening fire, but officials blamed some "anti-social elements" for the deaths.
State Home Minister Bhupendra Singh said an inquiry had been ordered.
Farmers have been protesting for days to put pressure on the government and other parts of the state have also witnessed similar rallies.
Experts say traders are not offering good prices to farmers because of oversupply caused by a bumper harvest.
Why are Tamil Nadu farmers protesting with mice and human skulls?
Indiaâ€™s farmers look to tech to beat climate change
Madhya Pradesh Chief Minister Shivraj Singh Chouhan said he was "deeply pained by the turn of events".
"I have already accepted all fair demands of the farmers," he said.
Mr Chouhan also announced that the state government would give compensation to the families of the victims, and pay medical expenses for the injured.
Rahul Gandhi, vice-president of the main opposition Congress party, said Mr Chouhan's government "was at war with farmers".
Mr Chouhan rejected the allegation and accused the Congress party of inciting farmers.
A curfew has been imposed in a district of the central Indian state of Madhya Pradesh following a day of violence in which five farmers died.