Codifying decentralized forms of law, such as the common law and customary law, has been a cornerstone of the positivist turn in legal theory since at least the nineteenth century. Commentators laud codification’s purported virtues, including systematizing, centralizing, and clarifying the law. These attributes are thought to increase the general welfare of those subject to legal rules, and therefore to justify and explain codification. The codification literature, however, overlooks codification’s distributive consequences. In so doing, the literature misses the primary motive for codification: to define legal rules in a way that advantages individual codifying institutions, regardless of how codification affects the general welfare. This Article fills this gap in the literature by examining three rationales for why states codify customary international law: 1) a desire to clarify the substantive content of customary law in order to promote cooperation (the Clarification Thesis); 2) a desire to enhance compliance through mechanisms such as monitoring, enforcement, and dispute-resolution provisions (the Compliance Thesis); and 3) a desire to define the content of customary rules for a state’s individual benefit (the Capture Thesis). While codification’s proponents conceive the enterprise in terms of the Clarification and Compliance Theses, I argue that states more frequently use codification to capture customary international legal rules to benefit themselves at the expense of the general welfare. As states with divergent views on how to interpret a customary rule pursue conflicting codification efforts, they entrench schisms in the law along regional or ideological lines, thereby delegitimizing customary rules and increasing fragmentation. Thus, far from being an unqualified boon to benevolent legal ordering, codification can replicate, magnify, or alter power dynamics present in forming bare customary law. Indeed, the fragmentation of customary law that can result from codification actually prevents a unified understanding of customary law from emerging -- the exact opposite of codification’s ostensible purpose. This Article uses the Capture Thesis to explain important developments in customary international law, including the outlawing of the slave trade in the nineteenth century, the rise of bilateral investment treaties, and the inability to reach agreement on a multilateral investment treaty.