A habeas corpus petition is used to argue that a person is being unlawfully held in custody, and should be released. Use this form to obtain the presence of a witness in a civil or criminal case.Application And Writ Of Habeas Corpus Ad Prosequendum PDF, 204 KB. These files may not be suitable for users of assistive technology. A habeas petition would be appropriate wherein the child is being held. However, there may be further remedies available. A writ of habeas corpus requires that a person who is in custody be brought before a judge or court and that they be able to challenge that custody. To file a habeas corpus petition, you must prepare a written request to a court or judge, known as a writ of habeas corpus. The attendance of a defendant being held in custody can still be secured through a traditional Application and Writ of Habeas Corpus Ad Prosequendum. Generally, anyone detained or imprisoned can file a petition for a writ of habeas corpus in the United States. (2) A hearing on a petition for a writ of habeas corpus under Chapter 17 of the General Statutes.