There is a huge and interesting argument on whether it was legal for the States which became the Confederacy to leave the Union. I can see interesting points in both sides of this argument. I come down on the side saying it was legal for the Southern States to secede, even if it might have been a bad idea.
One thing I don't see addressed by people arguing that States could not secede is the issue of West Virginia. Prior to the Civil War West Virginia did not exist as a separate entity, it was simply a part of the State of Virginia. After the Civil War began, West Virginia broke away from Virginia and was a new state in the Union. Someone will correct me if I am wrong on this description.
My question is, IF West Virginia could leave Virginia, Why couldn't the various Confederate States leave the Federal Union ???
According to the majority opinion of the Supreme Court in Virginia v. West Virginia, the Virginia Legislature gave explicit consent to have the election that resulted in the ultimate recognition of West Virginia as a separate state. The United States Congress also effectively approved statehood in its review of the West Virginia constitution. The process therefore complied with Article 4, Section 3 of the Constitution which states that "… no new State shall be formed or erected within the Jurisdiction of any other State; nor any State be formed by the Junction of two or more States, or Parts of States, without the Consent of the Legislatures of the States concerned as well as of the Congress."
In contrast, in Texas v. White the Supreme Court found that the Confederacy's claim of separation from the federal union was unilateral and not consented to by the other states and therefore invalid.
Why couldn't the various Confederate States leave the Federal Union ???
Because leaving the Federal Union (obviously) breaks up the Union, whereas leaving a particular state, whilst remaining part of the much larger Union, does not.