The loosely coordinated legal strategy faces uncertain prospects, and may represent a kind of precautionary measure for supporters of DACA, who are also engaged in a ferocious campaign aimed at spurring Congress to pass a law protecting people in the program from deportation. The litigation is likely to become a political rallying point for opponents of Mr. Trump, and should the legislative effort fizzle, a court challenge could become an alternative vehicle to derail or delay his policies.

To some extent, the court battle could reproduce some of the arguments surrounding Mr. Trump’s travel restrictions, pitting the traditionally sweeping powers of the presidency against claims that this particular administration, on a specific matter of policy, had misused its authority.

But presidents typically have broad discretion in matters related to national security and border control, and legal opponents of Mr. Trump’s policy are in the awkward position of arguing that while President Barack Obama had the presidential authority to create DACA, Mr. Trump does not have the authority to freely undo it. And the government can also assert that undercutting Mr. Trump’s decision to rescind the program would impinge on his power to enforce immigration law.

Jonathan Turley, a professor at George Washington University Law School, said Mr. Obama’s program was always going to be vulnerable to the whims of his successor.

“It’d be rather curious if President Trump could not use the same authority that President Obama used to create DACA,” Mr. Turley said. Echoing conservative arguments that Mr. Obama had overstepped his power, he added: “This is a problem you have when you ignore the constitutional structure. This matter should’ve always remained in Congress.”

Besides the argument that the Trump administration has violated the equal protection clause of the Constitution, the lawsuit filed Wednesday makes a more complex claim, saying that the administration failed to follow the right process, under the Administrative Procedure Act, for shutting down Mr. Obama’s program.

The states argue that DACA had become so entrenched in the immigration system that to abruptly end it was “arbitrary and capricious,” and that such a U-turn demanded a better explanation than what administration officials offered on Tuesday.