By the act of congress, the enlistment is void; and the soldier ought to be discharged, if this court have jurisdiction. We have jurisdiction, unless it has been expressly surrendered or taken away. Any person illegally detained, has a right to be discharged, and it is the duty of this court to restore him to his liberty. No act of congress, or of this state, has forbidden the exercise of this common law jurisdiction. It ought, therefore, to be *applied. The authorities referred to by the recorder, especially those of Massachusetts, sustain our view of the *472ease. We are of opinion that Carlton should be discharged by the recorder, whose power upon this writ is the same with 0urs.[1]
See New York Dig. vol. 2, tit. Habeas Corpus.