The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention. 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.Habeas corpus is a Latin phrase meaning "produce the body. The writ (or court order) of habeas corpus required that anyone, including royal officials, who detained a prisoner, had to show that this detention was legal. Explain the grounds for the petition: You will need to explain why you are seeking a writ of habeas corpus. Habeas corpus, or the Great Writ, is the legal procedure that keeps the government from holding you indefinitely without showing cause. A writ of habeas corpus is used to determine if a state's detention of a prisoner is valid. You do not need to cite law. You may submit additional pages if necessary. The Habeas Corpus petition claims the arrest, sentence, or trial violated constitutional law, making imprisonment unlawful.