WASHINGTON, June 9 -- For the Indian software engineer who watched a US job offer evaporate the week the fee landed last autumn, the arithmetic was brutal and simple. A visa that had cost a couple of thousand dollars suddenly cost a hundred thousand, and the calls from employers stopped. On Monday a federal judge pulled that wall down.

Judge Leo Sorokin struck down the $100,000 fee President Trump attached to new H-1B petitions, ruling that the charge is in substance a tax and that the power to tax belongs to Congress, not the president. The fee violated the Administrative Procedure Act and the Constitution, he found. The Justice Department is expected to appeal.

The H-1B program is, in practice, an Indian one. Indian nationals received...