Russia was in a shaky situation when it entered World War I in 1914, just as it had been when defeated by the Japanese in 1905. At first, however, there was hope a victorious war effort could pull the country together.
Unfortunately, rather than victories, the Russians suffered setbacks on the battlefield. In two defeats in 1914, at Tannenberg and the First Battle of the Masurian Lakes, Russia lost 250,000 troops: the equivalent of two entire armies. The German army then pushed the Russian army back farther and farther, taking all of the Russian section of Poland, Lithuania, and much of Latvia.
The problem was that the war threw the country, already economically weak, into economic turmoil, with shortages of food and basic necessities as the government focused on supplying the war effort. Further, people were upset about what seemed an endless and careless slaughter of Russian troops. The death toll reached 1.7 million, the troops were ill fed and supplied, and revolts began among the soldiers. Meanwhile, people on the domestic front had lost faith in the government, paving the way for a revolution that overthrew the royal family and instituted a communist regime.
If the war had not occurred, destabilizing an already shaky economy and political situation, it is very possible Russia could have solved its problems without as radical a solution as a communist revolution.