The 1907 trial of Big Bill Haywood in Idaho for the murder of former Governor Frank Steunenburg was a first ordeal for the upstart union, and also the most amazing event in US labor history. Read Big Trouble by J Anthony Lucas for the incredible story, a tapestry of American society of the time. Haywood's lawyer was Clarence Darrow. Pinkerton James McParland managed the prosecution's efforts. He had been instrumental in defeating the Molly McGuires, and was the go-to guy for anti-labor dirty work.
Astounding shenanigans abound, with jury tampering the mildest of the cheating and skullduggery. The trial was a near-perfect reflection of the struggle between capital and labor at the time. While the trial brought attention to the IWW, it also depleted its meager resources, which might have been better used fending off trade unionism, which was already stronger and easier to sell to American workers.
By 1917, the Espionage Act allowed the government to characterize the Wobblies as enemies of the state. Haywood was convicted in 1918, and fled to the USSR in 1921. His energy and personality were lost to the Wobblies.
The emergence of the Bolsehvik regime in Russia, and the Red Scare in the US, marginalized the IWW. Its leadership had been convicted under the Espionage Act, and supportive voices like Emma Goldman's were also lost to Attorney General Palmer's continual suppression of radicals, especially foreign nationals. Also, the US entered the war in 1917, and the resultant nativism pulled workers away from the more radical, and European, approaches to the struggle.
Overall, considering the reliance on Haywood as a leader, the direct efforts of capitalists to destroy the IWW, the legal attacks by the AG, the effects of the war on labor and the attitudes of workers, and the comparative attractiveness of trade unionism to American workers, it shouldn't be too surprising that the IWW lost its appeal and its power. Had the war not intervened, the Wobblies might have continued to grow after its success in Lawrence.
Again, read Big Trouble. It's an amazing telling of the intertwined social forces in play at the time.