A habeas corpus petition attacking a criminal conviction or sentence shall be filed within two years from the date of final judgment in the trial court. To use this form, you must be a person who is or will be serving a sentence under a judgment against you in a state court.Habeas corpus is perhaps the most critical writ available to prisoners for challenging criminal convictions and sentences in state and federal courts. The writ of habeas corpus is an extraordinary remedy designed to test the validity and legality of detention or incarceration. 1 (The term "federal law" includes not only federal statutes, but also U.S. treaties and the. Habeas corpus is available to prisoners challenging their convictions and sentences. The Latin phrase habeas corpus translates to "you have the body. A petition for a writ of habeas corpus is a legal challenge to the lawfulness of a person's imprisonment. In many countries, authorities may incarcerate someone for months or years without charging them. The writ of habeas corpus is a legal order requiring a person holding another person to produce that individual before a court or judge.