It certainly was a military conclusion but not legal one. After the war the Chief Justice of the Supreme Court and other top legal minds recommended to the victorious Federals to not attempt to charge any of the Confederate officials with treasonous acts and bring them to justice. The Federal government had no legal case and would have certainly lost in a public trial.
To be reentered into the United States (after being kicked out) the reconstructed states had to include in their constitutions that secession from the United States was illegal. No other states but they required it then or since. Over the years since reconstruction only one of these reconstructed states still has this provision in it's constitution, Mississippi, all others have removed it.
__________________
David Upton