I refer you to Texas v. White which ruled that secession as pretended by the various state legislatures in 1860-1865 was a legal nullity.
Texas vs White was after 1861-1865.....the winner declared right through might. I dont consider the question settled for all time. The Constitution itself does not prohibit secession, only the interpretations of the victors prohibits secession.
I refer you to James Madison, a principal author of the Constitution:
I partake of the wonder that the men you name should view secession in the light mentioned. The essential difference between a free Government and Governments not free, is that the former is founded in compact, the parties to which are mutually and equally bound by it. Neither of them therefore can have a greater fight to break off from the bargain, than the other or others have to hold them to it. And certainly there is nothing in the Virginia resolutions of 98, adverse to this principle, which is that of common sense and common justice. The fallacy which draws a different conclusion from them lies in confounding a single party, with the parties to the Constitutional compact of the United States. The latter having made the compact may do what they will with it. The former as one only of the parties, owes fidelity to it, till released by consent, or absolved by an intolerable abuse of the power created.