ObjectivesSince 1978, rural–urban migrants mainly contribute Chinese urbanization. The purpose of this paper is to examine the effects of socioeconomic factors on mental health of them. Their mental health was measured by 12-item general health questionnaire (GHQ-12).MethodsThe study sample comprised 5925 migrants obtained from the 2009 rural-to-urban migrants survey (RUMiC). The relationships among the instruments were assessed by the correlation analysis. The one-factor (overall items), two-factor (positive vs. negative items), and model conducted by principal component analysis were tested in the confirmatory factor analysis (CFA). On the basis of three CFA models, the three multiple indicators multiple causes (MIMIC) models with age, gender, marriage, ethnicity, and employment were constructed to investigate the concurrent associations between socioeconomic factors and GHQ-12.ResultsOf the sample, only 1.94% were of ethnic origin and mean age was 31.63 (SD = ±10.43) years. The one-factor, two-factor, and three-factor structure (i.e. semi-positive/negative/independent usefulness) had good model fits in the CFA analysis and gave order (i.e. 2 factor>3 factor>1 factor), which suggests that the three models can be used to assess psychological symptoms of migrants in urban China. All MIMIC models had acceptable fit and gave order (i.e. one-dimensional model>two-dimensional model>three-dimensional model).ConclusionsThere were weak associations of socioeconomic factors with mental health among migrants in urban China. Policy discussion suggested that improvement of socioeconomic status of rural–urban migrants and mental health systems in urban China should be highlighted and strengthened.Electronic supplementary materialThe online version of this article (doi:10.1186/s13033-016-0118-y) contains supplementary material, which is available to authorized users.