Final answer:
The Espionage Act of 1917 allowed the US government to prosecute and imprison IWW members. This act, expanded by the Sedition Act of 1918, targeted those who opposed the war effort, leading to numerous imprisonments, including that of notable figures like Eugene V. Debs.
Step-by-step explanation:
The legislation that allowed the US government to prosecute and imprison members of the Industrial Workers of the World (IWW) was the Espionage Act of 1917. During World War I, the American government enacted the Espionage Act to combat espionage and perceived acts of disloyalty. This law was later expanded by the Sedition Act of 1918, which prohibited language deemed disloyal to the US government. These acts were instrumental in the suppression of dissent during this period, leading to the imprisonment of individuals who opposed the war effort, including members of unions like the IWW. High-profile cases such as that of Socialist Party leader Eugene V. Debs, who was sentenced to ten years in prison for encouraging draft resistance, highlighted the impact of the Espionage Act on American citizens. The US government was able to prosecute and imprison IWW members primarily through the Espionage Act and the Sedition Act.