The Maryland attorney general's office had sought a declaration that the national health care act is constitutional.
But U.S. District Judge Ellen Hollander in Baltimore ruled that the state lacked standing to pursue the case because there was no firm evidence of impending harm to the law.
Hollander wrote that there was little dispute that President Donald Trump had "profound disdain" for the act.
"But the state’s allegations do not create a plausible inference of a substantial or certainly impending risk that the Trump administration will cease enforcement of part or all of the ACA," she wrote.
"In effect, the state proclaims that the sky is falling. But, falling acorns, even several of them, do not amount to a falling sky."
Democrats have accused the administration of trying to sabotage the health-care law that was partially undone when Congress repealed a mandate in 2017 that required most Americans to buy insurance or risk a tax penalty.
"You'd have to be living in a cave to not know Donald Trump hates the Affordable Care Act," Maryland Attorney General Brian Frosh said in an interview after the judge’s ruling. "But his statements, she says, are not enough."
Hollander dismissed the case without prejudice, meaning it could be refiled if circumstances place the state on firmer legal ground.
"There is a continuum of things that might give rise to standing, in her view." Frosh said.
The U.S. Justice Department is “pleased” by the ruling, said spokeswoman Kelly Laco, who did not elaborate.
In December, a federal judge in Texas ruled the health care law is unconstitutional. U.S. District Judge Reed O'Connor held that the law could not legally stand once Congress eliminated the tax penalty for people without health insurance. But the decision has been stayed pending an appeal to the 5th U.S. Circuit Court of Appeals.
In dismissing Maryland's suit, the judge did not rule on a related claim by lawyers for Frosh.
The lawyers argued in a December hearing that the Trump administration “displaced” a U.S. Senate-approved official — Rod Rosenstein — who was properly in line to become acting U.S. attorney general and illegally named Matthew Whitaker instead. Whitaker's appointment, they said, violated the U.S. Constitution’s appointments clause.
The requests in the suit were connected, Maryland’s attorneys argued, because Whitaker — if he was improperly appointed — should not be making significant decisions about whether to enforce the health care act.
The appointment of Whitaker has been challenged in multiple court cases. He is the former chief of staff to Jeff Sessions, before Trump ousted Sessions as U.S. attorney general last year.
The Justice Department called Whitaker "a totally sensible and reasonable choice."
Trump has named former U.S. Attorney General William Barr to again head the Justice Department. Barr served in the post from 1991 to 1993 under President George H.W. Bush. Barr’s confirmation hearing concluded recently, but the Senate has not voted on his nomination.