“The program known as DACA,” Mr. Sessions said simply, “is being rescinded.”

Immigration advocates, business executives, academic leaders, foreign governments and lawmakers in both parties condemned that action. Several legal rights groups have announced plans to fight the decision even as activists have mounted daily political protests in Washington and other cities across the country.

But Ms. Napolitano is uniquely positioned to plead the legal case on behalf of the policy, which she helped to develop for former President Barack Obama during her tenure as his top homeland security official.

It is her signature on the June 15, 2012, document that established the DACA program. In the three-page memorandum, she argues that the nation’s immigration laws were not designed to “remove productive young people to countries where they may not have lived or even speak the language.”

In the five years since she issued the memo, hundreds of thousands of young, undocumented immigrants signed up for legal work permits and DACA’s protection from deportation. The action by the Trump administration on Tuesday will allow some of those immigrants to remain protected for up to two years, but no new applicants to the program will be accepted. And after a six-month implementation period, many of will lose the right to work and will be subject to immediate deportation starting in early March.

While Mr. Trump’s action formally ended the program, the president appears to have had second thoughts. In a tweet just hours after ending it, Mr. Trump urged lawmakers to “legalize” the policy with legislation and said that if they do not he would “revisit” the issue.

In the lawsuit, Ms. Napolitano argues that by rescinding her 2012 memorandum – even with a six-month delay in implementation — Mr. Trump and Mr. Sessions violated rules under the Administrative Procedure Act, which requires the government to provide public notice and seek comment from affected parties before revoking a significant policy.