This working paper investigates the legislative origins of the US immigration detention system. This critical history is an attempt to broaden the discussion of the place and propriety of immigration detention in the American political landscape. The paper explains who has historically been subject to immigration detention, where and for how long the practice takes place, and what has lead to its rapid enlargement in recent decades. Using historical frames, this paper identifies and traces three key characteristics in the legislative development of the US immigration detention system: firstly, the increasingly restrictive nature of the system; secondly, the fact that the system it is more similar to an ad hoc bricolage of policies and contradictory justifications than a coherent assemblage of policies; and, finally, the criminalization of immigrants and resident non-citizens. What emerges from this narrative is a history of the expansion of the immigration detention system by the executive branch in response to periods of increasing politicization of immigration, particularly concerning the category of resident non-citizens. The paper argues that, in the absence of clear policy objectives, public oversight, and public accountability, government has developed the US immigration detention system without coherence and often hastily in reaction to events in the political sphere.