Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. 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.A § 2254 petition is a motion for a writ of habeas corpus. This motion cannot be filed until the applicant has exhausted the remedies available. Habeas corpus does not lie when petitioner is out on bail as he is presently at liberty. Habeas corpus, in other words, is a petition that asks the court to completely dismiss the charges against you over the Prosecutor's objection. The Habeas Corpus petition claims the arrest, sentence, or trial violated constitutional law, making imprisonment unlawful. Rule 5-802 is designed to address petitions filed after the entry of a final judgment and all direct appeals, however styled, in a criminal case. In a particular new case is to be applied retroactively. The Supreme Court of South Carolina affirmed.