Labor market discrimination is an important issue in developing countries where path-dependent institutions have been dominant, while effective institutional arrangements and policies have been hidden by local customs and culture. However, the existing applications of classical Blinder-Oaxaca decomposition face criticism for their imprecise understanding of the factors affecting institutional discrimination in labor markets, as well as for their lack of power in formulating well-targeted anti-discrimination policies. Following Oaxaca (1973), we propose a new method to decompose the total discrimination index (TDI) to analyze employment and wage discrimination in the labor markets of developing countries. The TDI is decomposed into the employment discrimination index (EDI) and the wage discrimination index (WDI), then into the underpayment index to majorities (UPI) and the overpayment index to minorities (OPI). We apply this method to the institutional discrimination against rural migrants in China’s urban areas. Using national representative data from 2002 to 2013, we have found that, 1) the TDI increased quickly after China entered the WTO, then dropped after anti-discrimination policies were implemented. 2) The TDI is mainly determined by the UPI, while the TDI’s fluctuation is mainly determined by the WDI. Our method provides insights into the changing composition of employment and wage discrimination and their respective labor market outcomes in developing countries. As a result, appropriate policy measures may be developed accordingly.