There were a lot of factors, mostly being based around education and emancipation, but also religion. People either educated themselves and started realizing how wrong slavery is and that African Americans aren't actually different, but rather the same as us, or they were motivated by religious beliefs that all people were created by god to be equals and that slavery is against god.