As the redistributive state gradually retreated from the economic sphere to give place to a competitive labor market, those who used to be under the protection of state egalitarian policies tended to lose out and face more disadvantages in the labor markets, whereas those who used to be discriminated against by the socialist state tended to gain more opportunities from economic liberalizations. These predictions are verified by the empirical evidence from Xinjiang in Northwestern China based on an analysis of a sample from the population mini-census in 2005. We show that Han and Uyghur Chinese were segregated into different economic sectors. The Han-Uyghur earnings gap was negligible in government or public institutions, but it increased with the marketization of the employment sector. On the other hand, Han migrants in economic sectors enjoyed particular earnings advantages and hukou registration status had no impact on earnings attainment except in government or public institutions. The findings shed new lights on the relationship between ethnicity, migration, and nationalism in the context of China's economic transition.