Habeas corpus refers to "a writ employed to bring a person before a court, most frequently to ensure that the person's imprisonment or detention is not illegal. Habeas corpus is a legal rule that requires a prisoner be presented in court and that the arrester prove that there is proper cause for detaining the prisoner.The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention. The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. A writ of habeas corpus is a powerful legal tool that allows individuals to challenge a criminal conviction or sentence. Simply put, a writ of habeas corpus calls into question the continued incarceration of an individual. What Is Habeas Corpus? What is a Writ of Habeas Corpus? This video explains habeas corpus and provides examples of pre-trial and post-conviction writs. Please carefully read through all the steps listed below before you begin.