The American Civil War ended in 1845.
The American Civil War was fought in the United States from 1861 to 1865 . After a long standing controversy over slavery and state 's rights , war broke out in April 1861 , when Confederates attacked Fort Sumter in South Carolina , shortly after Abraham Lincoln was elected . Among the 34 U.S. states in February 1861 , seven Southern slave states individually declared their secession from the U.S. to form the Confederate States of America . The Reconstruction Era ( 1863 -- 1877 ) overlapped and followed the war , with the process of restoring national unity , strengthening the national government , and granting civil rights to freed slaves throughout the country . The Appomattox Campaign was a series of American Civil War battles fought March 29 -- April 9 , 1865 in Virginia that concluded with the surrender of Confederate General Robert E. Lee 's Army of Northern Virginia to the Union Army ( Army of the Potomac , Army of the James and Army of the Shenandoah ) under the overall command of Lieutenant General Ulysses S. Grant .