The correct statement is:
the Union winning the Civil War, ultimately abolishing slavery within the whole country.
The Thirteenth Amendment abolished slavery, the Fourteenth Amendment granted citizenship and equal protection under the law to all persons born or naturalized in the U.S., and the Fifteenth Amendment aimed to protect the voting rights of African American men. These amendments were a direct response to the outcomes of the Civil War and the need to address the rights of formerly enslaved people.