In the Kentucky case, Judge Boasberg said the state’s plan, with only minor changes since his last ruling, “has essentially the same features as it did before.” He said that Mr. Azar’s review and approval of the Kentucky program were fatally flawed because federal officials did not adequately consider “the coverage-loss consequences” of the work requirements.

The rulings presented a serious setback not only for President Trump and Mr. Azar, but for Ms. Verma, who has led the call for conditioning government health coverage on work.

She has insisted that Medicaid must not be “used as a vehicle to serve working age, able-bodied adults.” And she affirmed her goals Wednesday evening after the latest rulings came out.

“We will continue to defend our efforts to give states greater flexibility to help low income Americans rise out of poverty,” Ms. Verma said. “We believe, as have numerous past administrations, that states are the laboratories of democracy and we will vigorously support their innovative, state-driven efforts to develop and test reforms that will advance the objectives of the Medicaid program.”

Both states’ plans are aimed at hundreds of thousands of working-age adults who became newly eligible for Medicaid when the Affordable Care Act allowed states to expand it starting in 2014. Arkansas’s version requires most Medicaid recipients between the ages of 19 and 49 to spend 80 hours a month at a job or in “community engagement” activities, like volunteering or training for a job. Kentucky’s, which has not yet been rolled out because of the court case, does the same for people between 19 and 64.

Both the Kentucky and Arkansas rules allowed exemptions for people deemed too sick to work, pregnant women, full-time students or primary caregivers of dependent children or disabled family members.

The Trump administration had asserted that some people in Kentucky who lost Medicaid would gain commercial insurance coverage. But Judge Boasberg appeared skeptical, writing that federal officials “cited no research or evidence that this would happen.”