The US Constitution's definition of treason is clear and simple:
Article 3, Section 3: "Treason against the United States, shall consist only in levying War against them, or in adhering to their Enemies, giving them Aid and Comfort..."The Congress shall have power to declare the Punishment of Treason, but no Attainder of Treason shall work Corruption of Blood, or Forfeiture except during the Life of the Person attainted."
There is no historical dispute that Secessionists in 1861 started, formally declared and waged war against the United States.
But does that make them necessarily traitors?
The answer depends on whether their declarations of secession were themselves considered constitutional.
So, is secession constitutional?
Answer: of course it is, if, if, if it's done according to the Founders' Original Intent -- meaning with mutual consent, or in Madison's words:
Bottom line: if slave-holders' declarations of secession were constitutional, then Confederates were no longer US citizens, and their declaration of war on the United States, on May 6, 1861, might not necessarily be classified as treason, according to the Constitution's definition.
At war's end, terms offered by Lincoln and Grant were basically: Unconditional Surrender in exchange for no prosecutions for treason.
So far as I know, the issue was never tried in Court, or in Congress, so it remains a matter of debate.