The purpose of the Civil War was to restore the Union of the Individual states and to preserve the Constitution. However, Congress was determined to make emancipation (freeing of the slaves) the primary issue of the war. Just before the outbreak of the Civil War, two issues faced the nation. The first was the freeing of the slaves, which the Southerners believed was a loss of property. The second issue was the right of secession (the withdrawal of a state from the Union).
The Constitution was an agreement between the states, so therefore each state had the right to leave the Union when they pleased. These issues divided the nation. In February of 1861, the Confederation states of America was formed.
It consisted of South Caroline, North Carolina, Virginia, Tennessee, Georgia, Florida, Alabama, Mississippi, Louisiana, Arkansas and Texas. On the 1st of January, 1863, President Lincoln issued the Emancipation Proclamation, declaring the freedom of slaves. However, the actual end of slavery did not come until 1865. The Civil War came to an end on the 1st of April, 1865.
With the end of the war came the concept that the United States is not a group of states but rather one nation. With the emancipation of the slaves, new issues, such as civil rights, appeared.