The Civil War
When Southern states began to secede from the Union after the election of Abraham Lincoln as President, Lee was torn between duty to the Union and to his state. He opposed secession, and prayed that war could be avoided. Lee was offered high command in the Federal army but declined, foreseeing that he might have to make war upon Virginia. “With all my devotion to the Union, and the feeling of loyalty and duty as an American citizen,” he wrote, “I have not been able to make up my mind to raise my hand against my relatives, my children, my home.”
When Virginia seceded, Lee resigned from the U.S. Army. He accepted appointment as head of the state's military forces, hoping they would be used for defense only. But when Virginia joined the Confederacy, with Richmond its capital, Lee became the principal military adviser to President Jefferson Davis, with the rank of general.
Lee was placed in command of the Confederacy's Army of Northern Virginia in June, 1862. He halted General George B. McClellan's drive on Richmond and scored a major victory over the forces of General John Pope in the second Battle of Bull Run in August, 1862. Lee then mapped an offensive strategy, ordering an invasion of Maryland. There followed the battle of Antietam, a bloody encounter that ended in a draw.
In May, 1863, Lee scored his greatest triumph, his 60,000 troops repulsing 100,000 men under General Joseph Hooker at Chancellorsville, Virginia. In July, however, Lee met defeat at the Battle of Gettysburg, an encounter that proved to be the turning point of the war.
After Gettysburg, Lee was on the defensive, as was the entire Confederacy. From the spring of 1864, his chief adversary was General Ulysses S. Grant, most formidable of the Union generals. Lee withstood Grant's direct attacks in the battles of the Wilderness (a wooded area near Fredericksburg, Virginia) and at Spotsylvania and Cold Harbor, but could not drive Grant back. Grant's goal was to capture Lee's army after wearing it down, and gain Richmond. After enduring a long siege and inflicting heavy losses on the Union forces, Lee gave up Richmond on April 3, 1865. Two months earlier he had been named commander of all Confederate armies.
Hopelessly outnumbered, half-starved, and with no hope of receiving supplies, Lee's army was surrounded by well-supplied Union troops. Deciding that further fighting would result only in needless loss of life, Lee surrendered to Grant at Appomattox Court House on April 9.

