"We are a band of brothers, and natives to the soil, fighting for the property we gained by honest toil." That is from a famous Confederate anthem, and the "property" spoken of was slaves, the only property whose ownership was threatened by the union army. 

But the point is, if you fight on behalf of a principle you disavow, you are nevertheless defending that principle against the enemy. The Nurenberg trials established that "following orders" didn't excuse soldiers from war crimes.

Regarding Lee, there is ample evidence including his own words that Lee considered "negroes" to be an inferior race unable to care for themselves, and that slavery was a blessing to them.  There is ample evidence that Lee, acting as estate executor in 1859, jailed and whipped slaves that had been manumitted by deathbed declaration. Of course many Southern "experts" take exception to what they consider a libel against their hero, whom no one can plausibly deny was a traitor to the nation of his birth.