On April 8 and 9, 1865, Robert E. Lee's Army of Northern Virginia met Union armies in what turned out to be the final two battles of the Virginia campaigns -- Appomattox Station and Appomattox Court House -- that effectively ended the Civil War.
Lee's army, which had looked unbeatable during the first two years of the war, was heading to supply trains at Appomattox Station. The Confederate forces were much reduced in number from recent battles, tired, and hungry. Lee underestimated the number of Union forces nearby and ordered an attack on federal cavalry. Despite some early success, it soon became clear to Lee that he was surrounded and unable to win or retreat.
About 500 troops were killed in these final battles.
Leading up to Lee's surrender, Union forces, long focused on the Rebel capital at Richmond, cut off three of four rail lines into Petersburg by the fall of 1864. By February 1865, Union armies were moving through the Carolinas in an effort to cut off Virginia and the capital from the rest of the south. Continued Union victories led Lee to order the evacuation of Petersburg and Richmond at the beginning of April, setting the stage for the final confrontations at Appomattox.
Grant had asked for Lee's surrender on April 7; Lee declined. When Lee and Grant did meet on April 9 at the McLean home in Appomattox Court House, they arranged terms that helped define the end of the war on other fronts. Four more surrenders followed: on April 26 General Joseph Johnston surrendered near Durham, North Carolina; on May 4 General Richard Taylor surrendered at Citronelle, Alabama; on June 2 General Edmund Kirby Smith surrendered the Confederate Department of the Trans Mississippi, and on June 23 General Stand Watie surrendered Cherokee Confederate forces in Oklahoma.