The Civil War was not originally framed as a war to free the slaves. In its early years, President Abraham Lincoln promised not to impose abolitionist goals on the South. He was desperate to keep border states like Kentucky and Maryland loyal to the Union, and he believed that making the war explicitly about slavery would make this difficult. Therefore it was not until 22 September 1862 that Lincoln proposed to free the slaves. But even then he issued only a provisional proclamation to emancipate slaves in select parts of the South where he had no authority. As the war had increased in rancor and violence, it became increasingly clear that the South was not going to stop fighting and peacefully rejoin the Union. After the Union victory at the Battle of Antietam, he ordered slaves freed in all areas of the Confederacy that did not declare loyalty to the Union by 1 January 1863. On that date, he issued his famous Emancipation Proclamation freeing slaves in those parts of the South that remained hostile to the Union. In many ways, the Proclamation was limited; it did not expressly free slaves in loyal border states, and it exempted those areas of the Confederacy already under Union control. However, it changed the character of the war in fundamental ways.
After New Year's Day 1863, the war became, for the North, a conflict aimed at freeing the slaves and ending the southern planter aristocracy. Each advance of northern troops was a move for freedom; each town and farm captured aided in the emancipation of slaves. What had begun as a war to corral rebellious states had become a great crusade for freedom and liberty. And it also became a fight to the death, for the South knew that losing the war meant an end to life as it had existed before the war. In addition, Lincoln made provisions for the use of black soldiers to fight the war. The Confederacy did not do likewise (until the very last months of the war), and they promised to shoot any captured black soldiers as runaways. That did not deter over 200,000 black men from fighting in the Union Army during the war; 38,000 were killed.
The most famous black unit was the 54th Massachusetts Infantry led by a white colonel named Robert Gould Shaw. All black units were commanded by white officers and Shaw's unit was no exception. Many of the black units were forced to perform menial tasks in support of white fighting units, and until late in the war, they were paid at a lower rate than white troops, if paid at all. Despite the prejudice they experienced, units like the 54th fought bravely and successfully in many battles. By the end of the war, 200,000 black men had fought for the Union.
Though the North fought the war to abolish slavery, public opinion was not all one-sided. There was still a great deal of racism in the North and it occasionally provoked serious violence. The most famous instance were the draft riots in New York that followed the beginning of conscription in July 1863. Fearing that a large free black population would take their jobs, many working-class groups, particularly the Irish, grew resentful of the war, ultimately rebelling against the draft. The four day riots that ensued were about many things—including the decision to allow rich men to pay their way out of fighting in the war—but race lay beneath it all. Bands of Irish workers and others sought out blacks living in the city and attacked them. Over 200 men, women and children were killed before Union soldiers returning from Gettysburg ended the mayhem. The war ended slavery, but it did little to end the prejudice and racism that blacks faced in the North as well as in the South.