Well now secession was legal, by the removal of the "perpetual Union" clause of the Articles of Confederation when writing the Consitution. You would think that if they wanted it to be a perpetual union , they would have included it in the Consitution. Then you you must consider the Tenth ammendment which, says that all rights not specifically given to the Federal Government shall be retained by the States. Now "shall" is a word which has a mandatory meaning, thus if a State Shall retain a right not given the Federal Government. The Federal Government , Can Not, take that right from the State.
Secession was legal by the Consitution.
Deo Vindice