This Chapter explains an important right—the writ of habeas corpus. The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment.Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. In Texas, the state writ of habeas corpus is a legal mechanism that allows individuals to challenge their detention or imprisonment. In United States law, habeas corpus is a recourse challenging the reasons or conditions of a person's confinement under color of law. Because the purpose of the petition is to gain the release of an unlawfully detained person, the reasons that justify the writ are narrowly defined. This process allows prisoners to petition the court and claim that their imprisonment is unlawful. Petitioner initiated this action for habeas corpus relief pursuant to 28 U.S.C. section 2254 (Doc. Any prisoner, or another person acting on their behalf, may petition the court, or a judge, for a writ of habeas corpus. After that motion was denied, Relator filed a petition for writ of habeas corpus with the Circuit Court of Randolph County in 18RACV00486 on.