Petition for Writ of Habeas Corpus. Petition for Relief From a Conviction or Sentence By a Person in State Custody (Petition Under 28 U. S. C. § 2254 for a Writ of Habeas Corpus).Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law. The procedure for filing a petition for a writ of habeas corpus is spelled out in the CPLR Article 70. This online program from Family Legal Care guides you through filling out a Petition for a Writ of Habeas Corpus. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. On all forms, ill out the caption (the top portion of each form naming the county, parties involved, and case number). United States law affords persons the right to petition the federal courts for a writ of habeas corpus. A petition for a writ of habeas corpus is a case filed in court, either state or federal court depending on jurisdiction. How to fill out the Petition for Writ of Habeas Corpus Instructions?