It is in the context of the global war on terror that the Habeas Corpus takes the center stage. Habeas Corpus is the right of individuals to challenge the legality of their detention if arrested. The underlying principle of habeas corpus is to put a check on unlawful detention. If we discuss habeas corpus especially in the context of the war on terror, the prison of Guantanamo bay will definitely find a mention. In this regard an important question has always been put forward. The question is if the law applies to those alleged terrorists who are being held at Guantanamo bay or other prisons like Bagram in Afghanistan or the other secret CIA jails or the black sites. Habeas Corpus is actually a very old writ whose main purpose was to contest detention by the king. Its origins are found in the thirteenth century England. The Great Writ mentioned, No free man shall be seized or imprisonedexcept by the lawful judgment of his equals or by the law of the land.It is also said to be the ancestor of habeas corpus. The writ only appears in US constitution, though other common laws were in force throughout the British Empire.