The migrants, including members of vulnerable minorities, had already been taken in buses and trucks to a military base on Malaysia's west coast to be loaded onto waiting Myanmar navy ships.
The United States and the United Nations had criticised the plan, while rights groups said there were asylum seekers among those due to be repatriated.
In their court challenge, rights groups Amnesty International and Asylum Access argued Malaysia would be in breach of its international duties by sending vulnerable people back to a country where they could be in danger.
Amnesty said it was "especially alarmed" the deportation was set to take place when there had been an "escalation of human rights violations" following the Myanmar military's seizure of power at the start of February.
The Kuala Lumpur High Court ordered a halt to the repatriation to allow a hearing to take place on Wednesday into the groups' bid to stop the deportations, their lawyer New Sin Yew told AFP.
Amnesty International Malaysia's executive director, Katrina Jorene Maliamauv, welcomed the ruling but said the detainees remained in danger of being deported to a country where they face "life-threatening risks".
"We urge the government to reconsider its plans to send this group of vulnerable people back to Myanmar," she said. (AFP)