Put simply, habeas corpus is a writ (petition) that can be used in a narrow set of circumstances to bring the case of a state prisoner. In United States law, habeas corpus is a recourse challenging the reasons or conditions of a person's confinement under color of law.Habeas corpus is a Latin phrase meaning "produce the body. Habeas corpus is an extraordinary remedy used to bring a confined person before a court to ensure that the person's detention is not illegal.