After the Battle of Gettysburg, in August of 1863, Lee asked to be relieved of his command. He said of the battle:

"No blame can be attached to the army for its failure to accomplish what was projected by me... I alone am to blame, in perhaps expecting too much of its prowess and valor... could I have foreseen that the attack on the last day would fail, I should certainly have tried some other course... but I do not know what better course I could have pursued."

His request was not accepted, and he served until the end of the war. He never attempted such an attack again.

Lee died of heart disease in 1870, perhaps the most beloved General in the history of American war.
.............................................................................