A Writ of Habeas Corpus is a motion which is filed most frequently to ensure that a Defendant's imprisonment or detention is not illegal. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration.Habeas corpus is a procedural device to bring child custody matters before a court. Special Writs, Orders to Show Cause, and Habeas Corpus. Local Rule of Civil Procedure (LRCiv) 3.5(a) provides that habeas corpus petitions must be filed on the courtapproved form. What Is Habeas Corpus? Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law. Habeas petitions provide prisoners whose rights are being violated with a means of requesting assistance from a judge. Federal criminal defense explains a federal Habeas Corpus petition, a legal remedy to protect against someone's unlawful and indefinite imprisonment. 1 (The term "federal law" includes not only federal statutes, but also U.S. treaties and the.