After a criminal conviction, a writ of habeas corpus may be used to claim that the laws were misapplied in your case. 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.Initiate the sanity proceedings set out in section 922.07, Florida Statutes) (1985). The same holding exists under federal law. The writ of habeas corpus is used to attack an unlawful detention or illegal imprisonment. The purpose of the remedy sought in a writ of habeas corpus is to determine the legality of the restraint under which a person has been held. Latin for "that you have the body. In many countries, authorities may incarcerate someone for months or years without charging them. It allows individuals to challenge their detention in a court of law and provides a check on the executive branch's power. Latin phrase meaning "you have the body"; A civil proceeding used to review the legality of a prisoner's confinement in criminal cases.