The Bombay High Court order followed a petition filed by a non-profit group challenging the liberal watering of pitches at a time when the state is reeling under a severe water scarcity.
The judges said all matches due to be held after April 30 must be moved out of the state, although earlier matches could go ahead as planned, the Press Trust of India (PTI) news agency reported.
The decision means 13 matches scheduled to be held in the cities of Mumbai, Pune and Nagpur will have to be moved.
The “shifting of IPL matches to another state can be a beginning towards addressing drought situation in Maharashtra”, the PTI quoted the judges as saying in the verdict.
Thousands of people, mostly poor farmers, have had to leave the worst affected Marathwada region because of the water shortage.
Last year around 1,400 farmers reportedly committed suicide in the region over crop failure from a lack of water, and an inability to meet loan payments.
The Board of Control for Cricket in India (BCCI) had on Tuesday sought to reassure the judges, saying only treated sewage water will be used to water the grounds.
Two franchises of the cash-rich Twenty20 league had said they would donate 50 million rupees ($750,000) to drought relief programmes if the matches could be kept in the state.
The current edition of the IPL, famous for its fireworks and dancing cheerleaders, kicked off on April 9 with 60 matches spread across 10 venues.
The tournament has been plagued by controversies ever since its inception in 2008, with corruption and match-fixing cases often taking centre-stage.