In your petition, clearly explain why you are being held illegally. It tests the legality of a detention or a restraint and the goal is to use it really almost i guess it's an emergency basis.In this video, David offers insight on how to file habeas corpus and compassionate release motions. By petitioning for a writ, you are asking the court to determine whether your conviction or sentence is illegal. Though subject to different rules, incarcerated people in both state or federal custody may petition for a federal writ of habeas corpus. What Is Habeas Corpus? Habeas corpus means demand of body. Release From Custody Under a Misdemeanor Conviction. If you are filing this petition in the superior court, you only need to file the original unless local rules require additional copies. The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty.