The Civil War began on April 12, 1861, when Confederate forces attacked the Union-controlled Fort Sumter in Charleston Harbor, S.C. The war officially ended on April 9, 1865, when Confederate General Robert E. Lee surrendered to Union General Ulysses S. Grant at Appomattox Courthouse, Va.
Following Lee's surrender, some small skirmishes were fought, but the events at Appomattox are generally considered the end of the war.
After years of differences between northern and southern states about slavery, trade, states rights and taxes, southern states threatened to leave the Union if Abraham Lincoln was elected president. Shortly after his 1860 election, South Carolina became the first state to secede. Other states soon followed, and together they formed the Confederate States of America.