Trump scrapped the Obama-era amnesty programme that granted work permits to immigrants who arrived in the country illegally as children, a move likely to impact 800,000 undocumented workers, including more than 7,000 Indian- Americans.
"To target these young people is wrong, because they have done nothing wrong. It is self-defeating because they want to start new businesses, staff our labs, serve in our military, and otherwise contribute to the country we love. And it is cruel," he said.
Obama's comments came hours after US Attorney General Jeff Sessions announced that the Deferred Action for Childhood Arrivals (DACA) has been rescinded.
He said the move was not "required legally", while terming it a "political decision".
More From This Section
"Whatever concerns or complaints Americans may have about immigration in general, 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 said.
"And now that the White House has shifted its responsibility for these young people to the Congress, it's up to members of the Congress to protect these young people and our future. I'm heartened by those who've suggested that they should. And I join my voice with the majority of Americans who hope they step up and do it with a sense of moral urgency that matches the urgency these young people feel," he added.
India ranks 11th among countries of origin for DACA students, according to the US Citizenship and Immigration Services statistics available till March 31, 2017.
Hundreds of protesters gathered outside the White House demonstrating against Trump.
The former US president said opposing the decision will determine "we are a people who kick hopeful young strivers out of America, or whether we treat them the way we'd want our own kids to be treated."
Obama said the Trump administration's decision on DACA is not about fixing the immigration system.
"Over the years, politicians of both parties (Democrats and Republicans) have worked together to write legislations that would have told these young people, our young people, that if your parents brought you here as a child, if you've been here a certain number of years, and if you're willing to go to college or serve in our military, then you'll get a chance to stay and earn your citizenship," he said.