A writ of habeas corpus is another means to fighting the legality of one's incarceration or proving actual innocence. A writ of habeas corpus refers to a court order that is issued to either an agency or a person who is holding someone in custody.A writ of habeas corpus is a court order issued either to an agency or a person who is holding someone in custody. The appropriate remedy is to seek a writ of habeas corpus. Writs share some similarities with appeals, but they differ in one critically important aspect. Under certain circumstances, a writ of habeas corpus that is sought in federal courts may allow a person to be released, or they may receive a new trial. The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. The state writ of habeas corpus is a legal mechanism that allows individuals to challenge their detention or imprisonment. Type of writ of habeas corpus used to bring prisoner to court to testify. Legal Assistant at The Law Office of Chris Arce.