The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention. A writ of habeas corpus is a legal order that requires a person who is holding another person in custody to bring the detainee before a court.A person's right to know the reasons for his or her imprisonment. Latin, meaning "you have the body. A writ of habeas corpus is a court order to a person or institution holding someone in custody to deliver the imprisoned person to the court. Put simply, it means that if you are arrested, you have the right to make the government prove to a judge that your arrest and detainment are justified. Writ of Habeas Corpus. A court order requiring jailers to explain to a judge why they are holding a prisoner in custody. Writ of habeas corpus – A court order requiring explanation to a judge why a prisoner is being held in custody. A writ of habeas corpus is a court order to a person or institution holding someone in custody to deliver the imprisoned person to the court.