Habeas corpus is a writ that states that a person cannot be kept in prison unless they have first been brought before a court of law. A writ of habeas corpus is an order from a court to an official to produce an inmate.So, a writ of habeas corpus is a court order to bring a person who's been detained to court to determine whether or not their detention is valid. This Chapter explains an important right—the writ of habeas corpus. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. It's crucial to understand its role in the justice system. The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. What is a Writ of Habeas Corpus? This video explains habeas corpus and provides examples of pre-trial and post-conviction writs.