Recommend reading the articles of confederation. They aren't shy about it, they state explicitly that preserving slavery is their chief concern in secession.
Funny if you flip it and reverse it, the logic doesn't hold up. If states rights are so important, why couldn't states pass laws of emancipation? Now the union is the one that cares so much about states rights! That can't be right, they weren't the ones trying to secede. See?