Before and immediately after the start of the United States Civil War, a total of 11 states seceded from the Union, starting with South Carolina on December 20, 1860 and ending with Tennessee on June 8, 1861.
Four of these states (Virginia, Arkansas, North Carolina, and Tennessee) did not secede until formal hostilities started with the Confederate bombardment of Ft. Sumter, in Charleston Harbor, South Carolina on April 12, 1861.
Of the states that remained in the Union, five were slave states: Maryland, Delaware, Kentucky, Missouri, and a fifth state that was not a state when the Civil War began.
The state of Virginia paid a heavy price for its participation in the Civil War. More battles were fought in Virginia than any other state (Tennessee ranks second in that statistic), and, during the war, it split into two states, with the western part of the state (under circumstances which some historians argue were illegal because the official government of Virginia never gave permission for the part that became West Virginia to leave - but on the other hand, Virginia had left the Union by then) voting to rejoin the Union as the State of West Virginia, a slave state.
The movement for the western part of Virginia to leave Virginia dates from
before the Civil War, but, because of the Civil War, was able to become a
As so many other "facts of history", the history of the Civil War is complex, with many twists and turns, and I am only a layperson, not a trained historian. There is a lot material online, if you are interested in how the exact process took its course.
What can't be disputed is that on March 26, 1863 voters approved the constitution of the to-be state of West Virginia along with an amendment called the Wiley amendment that would have gradually emancipated ("gradually" is the key word here) slaves in the state, and on April 20, 1863, 150 years ago yesterday, Abraham Lincoln proclaimed that area that would become West Virginia had met all the requirements to achieve statehood and would be a state 60 days later: on June 20, 1863.
June 20-23, 2013, the state of West Virginia will celebrate its sesquicentennial, the only state that entered the Union during the War Between the States.