The Chinese Exclusion Act is widely remembered as a symbol of racial discrimination in American history. But why did it become federal law in 1882? This article examines the economic transformation, labor competition, political mobilization, and diplomatic negotiations that ultimately led the United States to adopt the Chinese Exclusion Act.