Using the micro data of the China Labor Dynamics Survey (CLDS), this paper uses factor analysis to construct urban integration indicators and uses the OLS model and intermediary effect model to study the urban integration of 1976 migrant workers in 29 cities in China. This paper empirically analyzes the impact of labor contracts on migrant workers’ urban integration and its mechanism. The study found that: (1) labor contract can significantly promote the urban integration of migrant workers. Further, this conclusion is still tenable after correcting endogenous bias with the 2SLS model and performing a series of robustness tests. (2) Signing labor contracts increases the participation rate of migrant workers in various insurances, enhances the social security level of migrant workers, alleviates the discrimination in the urban labor market, and thus enhances the urban integration of migrant workers. (3) The results of the heterogeneity tests show that the labor contract has a greater impact on the urban integration of the new generation, married and public sector of migrant workers compared with the old generation, unmarried and private sector of migrant workers. Therefore, this paper makes the following suggestions: the government should strengthen labor market supervision, encourage employers to sign long-term labor contracts with migrant workers, improve the social security system for migrant workers, and protect the legitimate rights and interests of migrant workers.