This article addresses the linked topics of internal migration and occupational discrimination against migrants. The data, collected from 21 manufacturing companies in Shanghai, indicate that migrants are a heterogeneous group in terms of their origins. Migrants from rural areas are the least well-educated. In contrast, migrants from other cities in China have attained significantly higher education than local workers in Shanghai. Much of the literature compares the occupations of rural migrants and local residents; urban migrants are often neglected. By examining occupational patterns for rural migrants, urban migrants and local workers, this study adds to the literature through a full assessment of occupational inequalities. Such inequalities reflect both market forces (rewards for differing productivity) and institutional factors (rewards on grounds of residential status).