Russia pulled out of World War I because the communists wanted to focus on internal rather than external problems after they seized power in the February Revolution of 1917. Growing battlefield losses and defeats had exacerbated the discontent of the Russian populace that led to the revolution, and the Bolsheviks wanted to consolidate their power rather than continue to oppose the Central Powers with their weakened military.
At the beginning of World War I, Russia had the largest standing army in the world, consisting of about 1.4 million regular troops and 4 million reserves. However, the army was plagued with inefficient leadership and a shortage of weapons and ammunition. Entering the war in 1914, Russia quickly attacked Eastern Prussia. After gaining some territory, they were routed by German and Austro-Hungarian forces and by mid-1915, fell back to a front line in their own territory that remained fairly stable until they left the war. Though Russia's exact casualties are not known, they were undoubtedly catastrophic. Between 1 and 2.5 million Russians were killed, 1.5 to 5 million were wounded and almost 4 million were taken as prisoners of war.
In December 1917, Lenin managed to negotiate a cease-fire. In March 1918, Russia signed the Brest-Litovsk Treaty with the Central Powers, consisting of Germany, Austria-Hungary, the Ottoman
Empire and Bulgaria. In Russia's weakened condition, it was unable to oppose the ruinous terms. Russia lost about 1 million square miles of its territory, a third of its population, and a large part of its industry and oil, iron and coal reserves.