The administration had moved to close the Deferred Action for Childhood Arrivals (Daca) programme to new applicants earlier this year.
But District Judge Nicholas Garaufis on Friday ruled against the restrictions.
He told the administration to announce the full resumption of Daca by Monday.
The Daca programme was introduced by former Democratic President Barack Obama in 2012.
He set it up to help some of the more than 10 million immigrants who as young people entered the US illegally or overstayed a visa.
Trump: ‘I have great love’ for Daca Dreamers ‘Daca means continuing to live the American dream’
Most of the children protected by the Daca programme are from Mexico and other Latin American countries. These migrants are known as “Dreamers”.
The scheme protected an estimated 700,000 people, offering temporary permits for work and study.
But as part of his efforts to curb immigration, US President Donald Trump sought to end the programme in 2017, calling it unconstitutional.
The Supreme Court took up the case after lower courts ruled the administration did not adequately explain why it was ending the programme, criticising the White House’s “capricious” explanations.
In June this year, the Supreme Court upheld lower court rulings that found Mr Trump’s move to rescind Daca was “unlawful”.
Despite this ruling, the Acting Secretary of Homeland Security Chad Wolf issued a memo to limit the programme to those who were already enrolled.
Now Judge Garaufis of the US District Court in Brooklyn has ruled that Mr Wolf was not acting within his legal authority and that the scheme should resume.
The Center for American Progress, a think tank, said more than 300,000 new applicants could now be eligible for Daca.
“This is a really big day for Daca recipients and immigrant young people,” Karen Tumlin, director of the Justice Action Center, told AFP news agency.
Democratic President-elect Joe Biden, who takes office on 20 January, has said he plans to revitalise Daca.
His campaign said he will try to legislate to give a pathway to citizenship for undocumented immigrants living in the US, although such a move would need to be approved by Congress.