A federal judge in Manhattan threw out a lawsuit that alleged President Donald Trump violates the U.S. Constitution when his businesses receive payments from foreign and state governments.

A government watchdog group and business competitors of Mr. Trump who brought the lawsuit failed to show that the president’s alleged violations caused them harm or that their alleged injuries fell within “the zone of interests” the U.S. Constitution’s built-in anticorruption provisions seek to protect, U.S. District Judge George Daniels...