As for the causes of the war, slavery was not the primary reason. The reasons were economic. Slavery was the heated issue used to stoke the fires in the north for an otherwise unpopular war.

It was not much more popular in the south by the way. There were riots in both places.

As to compensation. Any former slave who asked for it received 40 acres and a mule to start a farm.

Lincoln had proposed sending them all back to their homelands, though no one was sure exactly where that was. Those few who chose to return to Africa founded the nation of Liberia.

I am not going to touch the aftermath of the war nor the causes of racism. But it should be sufficient to say that the people, mostly nonslave holders saw the former slaves as being placed above them for the purpose of retribution and political control.