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).The procedure for filing a petition for a writ of habeas corpus is spelled out in the CPLR Article 70. First, a U.S.C. § 2254 allows us to file a petition for Habeas Corpus when the client is in custody under sentence of a state court and is in a state prison. This online program from Family Legal Care guides you through filling out a Petition for a Writ of Habeas Corpus. This file contains detailed instructions for filing a Petition for Writ of Habeas Corpus. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. Writ of Habeas Corpus (NYC Family). Intheblanks form authorizing a filing agent to efile documents on behalf of an individual attorney. The NHRP has standing to file the Petition for habeas corpus on behalf of Happy.