Internal migration in China during the last three decades, the largest in human history, offers a rare opportunity to understand inequalities in the making. Using data spanning 10 years from China's largest metropolis, Shanghai, this study assesses how enduring state institutions interplay with the spread of market forces to shape income inequality between migrants and native urban workers.