Brown was tried for treason against the Commonwealth of VA., Inciting slaves to insurrection and murder. he was found guilty on all three counts. The treason charge was the only one which a spirited challenge occurred . The court ruled that treason meant waging war against the state whether or not the person was a resident.
The Yale Law School Avalon project gives an excellent account of the proceedings, including a discussion of the treason charge in greater detail.:
http://avalon.law.yale.edu/19th_century/john_brown.asp
Federal authorities appeared only too glad to have VA Governor Henry Wise, future CSA General and Bro-in-law of Gen G G Meade, take this political hot potato off their hands. If tried by the Feds it would have been a political show trial.
An interesting side effect to the John brown affair is that fear of a large slave rebellion caused the states of the south to revive the militia system which had deteriorated. The newly equipped and trained southern militia gave the CSA a larger pool of reasonably trained and equipped troops than the Northern militias were capable, early in the war.