Just look at the primary source documents that declare the purpose of the war, Mississippi is a good example:
A Declaration of the Immediate Causes which Induce and Justify the Secession of the State of Mississippi from the Federal Union.
In the momentous step which our State has taken of dissolving its connection with the government of which we so long formed a part, it is but just that we should declare the prominent reasons which have induced our course.
Our position is thoroughly identified with the institution of slavery-- the greatest material interest of the world. Its labor supplies the product which constitutes by far the largest and most important portions of commerce of the earth. These products are peculiar to the climate verging on the tropical regions, and by an imperious law of nature, none but the black race can bear exposure to the tropical sun. These products have become necessities of the world, and a blow at slavery is a blow at commerce and civilization. That blow has been long aimed at the institution, and was at the point of reaching its consummation. There was no choice left us but submission to the mandates of abolition, or a dissolution of the Union, whose principles had been subverted to work out our ruin. That we do not overstate the dangers to our institution, a reference to a few facts will sufficiently prove.