^"The only rule about history is that there are no rules." - Some professor in the Compiled What If? I was reading earlier.
Flag of the Confederate Socialist Republics of America
In 1862 the Confederacy defeats the union in the ACW by successfully defending forts Donelson and Henry, and successfully launching Lee's planned invasion of Maryland and Kentucky.
The Confederacy builds up its industry after the war, but the plantation aristocracy still dominates the government. This causes class tension.
When, in 1904, the CSA and USA go to war again, it quickly degenerates into a bloody trench stalemate. The small farmers and factory workers of the CSA, as well as free blacks and the remaining slaves, blame the war on the aristocracy, and unite in their hatred of it.
In 1909, the exhausted citizens of the CSA, whipped up by the rhetoric of the confederate Socialist Party, revolt. Soldiers mutiny and the government is overthrown. The plantations are divided amongst the small farmers and the (now emancipated) slaves, and the old aristocrats are driven from the country or killed. The Socialist Party takes control in Richmond and declares the foundation and constitution of the CSRA...