Trump has made conflicting statements about whether he would support the legislation.
The states challenging Trump's action argued that canceling the payments violated the Affordable Care Act, amounted to an "arbitrary and capricious" action in violation of the Administrative Procedure Act and breached "the president's constitutional duty to take care that the laws be faithfully executed."
"Congress both mandated that the payments be made and exempted them from the annual appropriations process by creating a permanent appropriation for these funds," the lawsuit said.
Lawyers for Trump countered that Congress had never appropriated the money for the payments and that ending them caused no immediate harm to the states.
"The harms that they allege are speculative; at best they will occur months or years from now, not next week," administration lawyers argued.
They also said the issue was already pending before the D.C. Circuit Court of Appeals in a similar case, and the states could ask that circuit court to block Trump's action.
The money at issue, known as cost-sharing reduction payments, has been one of the more controversial elements of the Affordable Care Act, denounced by Trump and other Republicans as a "bailout" for insurance companies.
In fact, almost the opposite is true -- the federal government will pay more to insurers without the cost-sharing payments than with them because of the way the health care law works, according to the nonpartisan Congressional Budget Office. Eliminating the payments would cost the government roughly an extra $20 billion a year, the budget office estimated in August.
In addition to raising the cost to the government, ending the payments would cause premiums to rise sharply in many states and could cause some insurers to quit the market altogether, officials in several states, patient advocates and insurance industry executives have said.
Although it was Democratic attorneys general who brought the case to court, the impact of cutting off the payments would be largest in Republican states, which have a higher share of consumers covered by the payments, according to insurance analysts.