The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. The state writ of habeas corpus plays a vital role in safeguarding individual rights and ensuring fairness in the criminal justice system.A writ of habeas corpus is another means to fighting the legality of one's incarceration or proving actual innocence. One way to challenge the legality or prove innocence is to file a writ of habeas corpus. Call 936-647-1540 for tailored legal solutions in state and federal cases. The procedures required in state habeas work vary somewhat depending upon the nature of the case – i.e. Sec. 12. HABEAS CORPUS. The writ of Habeas Corpus is a writ of right, and shall never be suspended. The procedures required in state habeas work vary somewhat depending upon the nature of the case – i.e. Habeas corpus literally means "produce the body.