Writ of Habeus Corpus

A Writ of Habeas Corpus is an action challenging the legality of the imprisonment
28 USC 2241 - 2266
It has nothing to do with guilt or innocence but instead focuses on due process; were you properly detained, tried, and imprisoned?
In order to file a Writ of Habeus Corpus you must be in custody.

Special case for aliens

28 USC 2241(e)(1) "No court, justice, or judge shall have jurisdiction to hear or consider an application for a writ of habeas corpus filed by or on behalf of an alien detained by the United States who has been determined by the United States to have been properly detained as an enemy combatant or is awaiting such determination."

An exception is made for detainees challenging their imprisonment under 42 USC 2000dd which prohibits cruel, inhuman, or degrading treatment or punishment.

My comment - This is a denial of due process under the 5th amendment and is unconstitutional.