In a long Facebook post made on Tuesday afternoon, Mr Obama said that the move was a “political decision, and a moral question” that was not required legally.
“We shouldn’t threaten the future of this group of young people who are here through no fault of their own, who pose no threat, who are not taking away anything from the rest of us,” he wrote.
Donald Trump announced on Tuesday that he will end the Deferred Action for Childhood Arrivals program, giving a six month window for Congress to put forward an alternative.
The scheme allows undocumented migrants who arrived in the United States as children to apply for permits to live and work legally in the USA.
It was introduced by Barack Obama in 2012, but the former President had hoped to pass wider ranging legislation.
An original proposal, the Development, Relief and Education for Alien Minors (DREAM) act, sought to grant permanent residency to those who had arrived illegally, but the DACA program was introduced as a compromise when that legislation failed to pass.
Around 800,000 people currently live in the USA under the DACA program – many of whom have jobs, homes, families or are pursuing an education in the country – and are now at risk of deportation.
Those who have been in the country since early childhood may not be protected from potential removal, often to countries they have not visited for years or even decades.
Donald Trump has defended his decision, arguing that he is protecting American jobs and upholding the rule of law.
It is now up to Congress to outline an alternative legislation that can offer the young migrants protection from deportation.
Mr Obama called on lawmakers to “protect these young people and our future”, in an unusual intervention for a politician who in the past has shied away from strident criticism of Mr Trump’s policies.
“What if our kid’s science teacher, or our friendly neighbor turns out to be a Dreamer? Where are we supposed to send her? To a country she doesn’t know or remember, with a language she may not even speak?” Mr Obama wrote.
“What makes us American is our fidelity to a set of ideals – that all of us are created equal; that all of us deserve the chance to make of our lives what we will.”