I was watching a documentary about the civil war and it made it seem like the root cause of the war was disagreements over the morality of slavery between the north and the south. Idk but to me it seems kind of hard to believe that the north took up arms mainly to fight the racist ideals of the south and to abolish the institution of slavery. I feel like in the 1860s most white northerners, including politicians and lawmakers, we're probably still racist to some degree, right? I feel like there had to have been some other, more political reasons for the start of the war.
I think it's accurate to state that slavery was the root cause of the war. But moral reasons rarely cause war. The country was deeply divided over slavery but those divisions were more political and economic than moral.
Economically, cotton's growth in the south had extended a necessary condition that allowed the south to become reliant on slave labor to produce it's biggest export, whereas in the North industrialization had shifted the preferred form of manual labor from slaves to low-wage workers (often immigrants). If you look at census information from 1790 through 1860 it'll show that slaves were already much higher in proportion in the southern states (40% in some cases) compared to those in the north (<5% mostly). These economic factors continued in growth up until the war, and as cotton grew, so did the population of slaves required to produce it. (http://wps.ablongman.com/wps/media/objects/244/250679/carnesmg/G237A.gif)
Politically, disagreements over slavery also caused the divide within the Democratic party which sent two candidates to oppose Abraham Lincoln which allowed him to be elected despite such little support within the South. Lincoln received less than 40% of the popular vote, but won the electoral college rather convincingly and did very poorly throughout the South. This did little to help the cause of southern opponents to secession, which had almost happened earlier in South Carolina up until 1852. With Lincoln's election this re-intensified and South Carolina seceded in December 1860 before Lincoln's inauguration. If you read the SC Declaration of Secession the two general grievances that stick out the most are clearly state sovereignty and slavery. Of those the one glaringly irreconcilable one seems to be slavery:
"A geographical line has been drawn across the Union, and all the States north of that line have united in the election of a man to the high office of President of the United States, whose opinions and purposes are hostile to slavery. He is to be entrusted with the administration of the common Government, because he has declared that that "Government cannot endure permanently half slave, half free," and that the public mind must rest in the belief that slavery is in the course of ultimate extinction...This sectional combination for the submersion of the Constitution, has been aided in some of the States by elevating to citizenship, persons who, by the supreme law of the land, are incapable of becoming citizens; and their votes have been used to inaugurate a new policy, hostile to the South, and destructive of its beliefs and safety... On the 4th day of March next, this party will take possession of the Government. It has announced that the South shall be excluded from the common territory, that the judicial tribunals shall be made sectional, and that a war must be waged against slavery..." (http://avalon.law.yale.edu/19th_century/csa_scarsec.asp)
From there it was like an avalanche. By the time Lincoln became president the deep south had already declared independence and the confederacy was born. Lincoln was sworn in on March 4th. Fort Sumter was shelled by secessionists on April 12th and in 3 days Lincoln called for the raising of 75,000 troops. Virginia and the rest of the confederate's were appalled by that decision and used Northern military preparations to justify their joining the side of the confederates. The course for the war had been set.
The Northern soldiers who volunteered did so largely to protect the Union. And their confederate counterparts volunteered to protect their homes from the Northern invaders. Most on either side could have cared little about slavery, and most did not fully understand the underlying political and social factors that would soon put them in the meatgrinder of war.
The short version is that loyal white Americans embarked on a war to preserve the Union. A series of military defeats and the insistence of loyal black Americans transformed the war into one of emancipation rather against the will of a fair number of those whites, who accepted the change out of military necessity and often with considerable reluctance. But all that bears some unpacking.
The United States did not wage a civil war to free the slaves, initially. There was a vigorous and growing antislavery movement in the North, which managed to elect a president on an antislavery ticket in 1860. That movement was not oriented toward attacking slavery in the South, but rather keeping it out of the North and penning it in so that it might slowly wither away. That was quite enough for most of the South to rebel in order to preserve slavery.
The US need not fight to end slavery in order for the South to rebel to save it, though. Once the South rebelled, the choice was less over slavery than over whether or not the nation could endure at all. The nation had inflicted no great crime, or even a minor indignity, upon the slave states. It just elected a president they didn't like. If such an ordinary, regular national vote going against them was just cause to break the Union, then the rebel states aimed to set a precedent that it would break every four years. Part of the deal in agreeing to elections is that you agree you might lose them. To reject that is to reject the idea that elections are a legitimate way to decide who runs the country.
Once you cross that bridge, what's there left to a republic? At best case you'd have an absolutely paralyzed government, unable to get anything done because someone will always disagree and thus threaten to destroy the nation. More likely, the nation is destroyed in short order.
And this is the nineteenth century. Americans are keenly (and tediously) aware that they're the world's lone experiment in republican government. They also know that they are by no means a great power, but rather one under considerable threat from European empires. (There is much more perception than reality to this, probably, but the antebellum decades have a fair number of war scares involving European powers.) With bad old Europe always circling, ready to pounce, the nation cannot afford to be weakened that way. It certainly can't tolerate a new, hostile power on the continent. The Confederacy, if it could endure, would present just that kind of threat.
Permitting secession would thus be the end of the American experiment, whether it came at the hands of external enemies taking advantage or further rebellions. No other nation, at least to their minds, enjoyed anything like their freedoms. Those freedoms rested in the American system of government, from the Constitution on down, and could probably not endure without it. Thus, in the idiom of the time, they rallied to the preservation of the Union.
There are idealists and radicals from early on who want a war against slavery. The loyalties of the border states remain dubious (except for Delaware), so that's not politically feasible. Lincoln has to order rescinded or rescind himself emancipation orders put out by a few field commanders in hopes of keeping them in line.
The initial vision of the war on both sides involves a fairly quick struggle of one or two decisive battles. Then either the US realizes the South cannot be conquered or the unionists in the South seize back control of their governments and return to the fold. It didn't work out that way. Instead, almost from the moment US armies enter the rebelled states, enslaved Americans vote with their feet by taking the opportunity to get clear of their legal owners and present themselves to the military.
For a brief period, they get returned to their owners by US officers. But the rebels put slave labor to work building their fortifications and in various other support roles for the CS armies. Doesn't that make them, per the logic of slavery, war material subject to seizure by the opposing force? Denying slave labor to the enemy had an obvious military advantage. US general Benjamin Butler reasons that the slaves who have come to his lines are contraband of war which he is under no obligation to return. (Indeed, doing so might amount to aiding the enemy in time of war. We call that treason.) So he refuses to surrender the slaves, instead putting them to work.
This becomes US policy, first informally but then through legislation. And if the US is taking in these slaves who fled their disloyal owners and putting them to work for the Union, which it did, then what happened to them when this was all over? They didn't want to go back to slavery and as more and more white northerners saw slavery up close, and might even get to know some contrabands on their own, they were less willing to force them to go back. Policy developed in the first year of the war leads in the second to the preliminary Emancipation Proclamation, warning the rebels that they've got until January 1 to give it up and resume their normal place in the nation or their slaves will be freed. And by the way, the US will start employing those contrabands as soldiers too.
Obviously that was not going to fly with the Confederacy. They kept on and the United States military officially became an army of emancipation on January 1, 1863. Of course that posed its own problem. Lincoln issued the EP under his war powers. When the war ended, what happened? Could it withstand court challenges in peacetime? Probably not, but a constitutional amendment could. It took a lot of lobbying hard work, which Lincoln didn't live to see the end of, but the Thirteenth Amendment was ratified at the end of 1865.