The resignation comes after ethnic violence that has plagued the country.
Maiga was appointed in December 2017 and renamed to the job only last September, after Keita was re-elected.
"The President accepts the resignation of the prime minister and that of the members of government", Reuters quoted the country's President Ibrahim Boubacar Keita as saying. The leader of the ethnic Dogon militia suspected in the massacre has denied his fighters were involved.
Lawmakers of the ruling and opposition parties had a submitted a no confidence motion against the government on Wednesday.
This comes a month after a horrific massacre of Fulani community members carried out by the Dogon ethnic group in which almost 160 people were killed.
An AFP reporter at the time said many homes in the village had been burned down and the ground was littered with corpses.
The Fulani are also accused of supporting a jihadist preacher, Amadou Koufa, who rose to prominence in central Mali four years ago.
But the militia, called the Dan Nan Ambassagou, also used its powers to attack the Fulani, and was ordered to be dissolved after the village massacre.
Mali has been struggling to control violence since Al-Qaeda-linked Islamist extremists gripped the desert north of the country in 2012. A French-led military operation had driven our most of the jihadists in early 2013, but many areas in the country are still vulnerable to Islamist attacks. Upon a first French contingent arrived in Mali, the United Nations deployed in 2013 about 13,000 peacekeeping soldiers to face insecurity in the country.