The war was absolutely about slavery. Read the secession documents where the states lay out their reasons. They cited slavery over and over. They cite slavery as the cause for their secession.
"The people of the State of South Carolina, in Convention assembled, on the 26th day of April, A.D., 1852, declared that the frequent violations of the Constitution of the United States, by the Federal Government, and its encroachments upon the reserved rights of the States, fully justified this State in then withdrawing from the Federal Union; but in deference to the opinions and wishes of the other slaveholding States, she forbore at that time to exercise this right. Since that time, these encroachments have continued to increase, and further forbearance ceases to be a virtue..
This 'right' being the 'right' to own slaves. As they lay out explicitly and repeatedly in their Articles of Secession:
"[A]n increasing hostility on the part of the non-slaveholding States to the institution of slavery, has led to a disregard of their obligations, and the laws of the General Government have ceased to effect the objects of the Constitution. The States of Maine, New Hampshire, Vermont, Massachusetts, Connecticut, Rhode Island, New York, Pennsylvania, Illinois, Indiana, Michigan, Wisconsin and Iowa, have enacted laws which either nullify the Acts of Congress or render useless any attempt to execute them. In many of these States the fugitive is discharged from service or labor claimed, and in none of them has the State Government complied with the stipulation made in the Constitution. . . ."
Its only later, after losing its bid to preserve that objectively evil practice, that that the South tried to reform its image and divorce its betrayal from the defense of slavery and position themselves as defenders of 'States Rights'.
There are no 'States Rights'. States have powers. People have rights.
The South murdered tens of thousands of loyal American soldiers to preserve the POWER of the State to strip PEOPLE of every right so they could be sold as property.
That's the legacy of the Confederacy.