 Virginia voted to secede from the United States on April 17 , 1861 , after the Battle of Fort Sumter and Abraham Lincoln 's call for volunteers . On April 24 , Virginia joined the Confederate States of America , which chose Richmond as its capital . After the 1861 Wheeling Convention , 48 counties in the northwest separated to form a new state of West Virginia , which chose to remain loyal to the Union . Virginian general Robert E. Lee took command of the Army of Northern Virginia in 1862 , and led invasions into Union territory , ultimately becoming commander of all Confederate forces . During the war , more battles were fought in Virginia than anywhere else , including Bull Run , the Seven Days Battles , Chancellorsville , and the concluding Battle of Appomattox Court House . After the capture of Richmond in April 1865 , the state capital was briefly moved to Lynchburg , while the Confederate leadership fled to Danville . Virginia was formally restored to the United States in 1870 , due to the work of the Committee of Nine . 
