For the Union forces, the primary goal of the U.S. Civil War was to preserve the Union. The Southern states had broken away from the United States to form the Confederate States of America, and Northern forces aimed to defeat and reunite the Confederate forces in order to maintain a single unified nation. This objective was considered paramount as it safeguarded the nation's territorial integrity and national identity.
For the Confederate states, the primary goal of the civil war was to achieve and maintain independence or autonomy from the Union or northern territories. They sought to defend and secure their right to maintain slavery, uphold states' rights, and establish sovereign control over their lands and economic systems, which clashed with the centralizing tendencies of the federal government under President Abraham Lincoln.