Gandhi witnessed racial discrimination and abuse against Indians in South Africa, particularly the treatment of indentured laborers. This injustice, including being thrown off a train at Maritzburg for refusing to leave a first-class compartment, motivated him to stay and fight for civil rights using nonviolent methods.