Three officials from the Youth Ministry had called Modi a "clown," a "terrorist," and a "puppet of Israel" on social media platform X, formerly known as Twitter.
The President of Maldives, Mohamed Muizzu, has ordered an investigation and suspended the deputy ministers pending the outcome.
"The government of Maldives is aware of derogatory remarks on social media platforms against foreign leaders and high ranking individuals," the government said in a statement.
"These opinions are personal and do not represent the views of the government of Maldives."
Some viewed Modi's post as trying to draw visitors away from the Maldives.
The nation of 1,192 low-lying islands relies on tourism for a third of its economy. Indians make up the largest group of international visitors.
Muizzu won an election last year with a pledge to abandon the Maldives' "India first" policy in a region where New Delhi and Beijing vie for influence.
He also pledged to remove a small contingent of Indian troops stationed on the archipelago.
However, he has toned down his anti-India rhetoric since coming to power. Sources told the AFP news agency that the Maldives government was concerned about potential repercussions from the posts about Modi.