How the Confederate soldiers were treated after the Confederate surrender?

Answer:
Remarkably leniently.

Grant told Lee that if the Army of Northern Virginia handed in their weapons and went home, they would not be persuecuted and Lee would not be jailed.

Lee was so impressed with this gesture that he would not hear a bad word against Grant for the rest of his life.

As for Sherman, taking the surrender of Joseph E. Johnston in Carolina, he offered even more generous terms, because he thought that these were what Lincoln would have offered. But Lincoln was dead by then, and the new President Johnson was not prepared to ratify them. This caused some discord during Reconstruction.
First answer by Jonathan Begg. Last edit by Isabella Steiner. Contributor trust: 0 [recommend contributor recommended]. Question popularity: 3 [recommend question].