A directive to shut the Dadaab camp and forcibly repatriate about 260,000 Somali refugees living there was issued last year.
The deadline for its closure had been extended until May, but a high court judge ruled the decision was tantamount to an act of group persecution.
The government had argued it was an issue of security.
It said that attacks on its soil by the Somalia-based al-Shabab group had been planned in the camp.
Dadaab was set up in 1991 to house families fleeing conflict in Somalia, and some people have been living there for more than 20 years.
The Kenya National Commission on Human Rights and lobby group Kituo Cha Sheria challenged the decision in court, saying it was discriminative and contrary to international law.