The use of immigration law to detain foreign nationals has come under increased scrutiny in recent years, as the federal government has increasingly resorted to immigration law as an authority for preventive detention in settings where criminal law would not permit it. Most prominently, the Attorney General used immigration law to justify detaining the majority of those arrested in the mass preventive detention campaign he conducted and is conducting in the wake of the terrorist attacks of September 11. Congress has mandated detention of certain foreign nationals deportable for having committed criminal offenses, a practice currently under review by the Supreme Court. And the INS has used detention of Haitian asylum seekers for symbolic purposes. In this article, I argue that apart from the detention of enemy aliens during wartime, due process prohibits preventive detention in any setting - immigration or otherwise - absent an individualized showing that the person is either dangerous or a flight risk, and a legitimate government purpose other than detention itself. These due process limits apply across the board, to bail decisions in the criminal context, to civil commitment, and to immigration detention. Yet because immigration law in recent years has lost sight of these basic principles, taking due process seriously would have radical consequences for immigration detention as currently practiced. Part I lays out the general principles that apply to civil preventive detention, which establish that substantive due process is violated without an individualized showing after a fair adversarial hearing that there is something to prevent, namely danger to the community or flight. Part II applies this general framework to immigration detention. It first demonstrates, by a review of Supreme Court decisions, that the Court has applied the same due process principles to immigration detention that it has to other forms of civil detention; in other words, this is not a subject on which immigration exceptionalism, or the plenary power doctrine, has played much of a role. Second, I apply these general principles to several immigration law developments since 1996, illustrating that significant aspects of the INS's current detention policy and practice violate due process. Finally, I take up the issue of detention of entering aliens, and argue that cases holding that due process does not limit entering aliens' detention are predicated on an erroneous conflation of the decision to exclude and the decision to detain.