Two men caught sampling their medical marijuana crop in Washington state can’t stop the federal government from prosecuting them for violations of the Controlled Substances Act.

A trial court properly held that the growers didn’t meet their burden of showing compliance with Washington’s medical marijuana law, the U.S. Court of Appeals for the Ninth Circuit said July 9.

The growers were indicted after they were found smoking during a raid in 2011. Their first attempt to block prosecution was unsuccessful,...