The Confederates fought in the American Civil War primarily to protect their states' rights and preserve the institution of slavery, which was an integral part of their economy and society.