\nEvery person imprisoned or restrained of his liberty within this State, for any criminal or supposed criminal matter, or on any pretense whatsoever, except in cases specified in G.S. 17-4, may prosecute a writ of habeas corpus, according to the provisions of this Chapter, to inquire into the cause of such imprisonment or restraint, and, if illegal, to be delivered therefrom. (1868-9, c. 116, s. 1; Code, s. 1623; Rev., s. 1821; C.S., s. 2205.)
North Carolina Legal Code
§ 17.3
Source: https://www.ncleg.gov/EnactedLegislation/Statutes/HTML/ByChapter/Chapter_17.html· Version 2026