Internal rural-to-urban migrants in China are facing a high risk of mental disorders. Previous research on mental health correlates and predictors among this population focused on individual-level characteristics, neglecting network-level indicators, and migrant–urbanite intergroup relationship. A cross-sectional survey was conducted in Beijing, China from December 2018 to January 2019. A convenience sample of 420 rural-to-urban migrants completed the Chinese 12-item General Health Questionnaire and reported their relationship with urbanites in the past six months. Multivariate linear regression models were used to test the association of the inter-hukou network with migrant mental health. Two indicators of the inter-hukou network were significantly associated with migrant mental health. Migrants were more mentally healthy if their proportion of weak ties in the inter-hukou network was no less than 50%. The more social support migrants received from the inter-hukou network, the better their mental health was. Meanwhile, there was a significant interaction effect between social support and sex, indicating that the same level of social support better protected the mental health of female migrants. Results suggest the importance of social network factors and migrant–urbanite ties for migrant mental health. Future efforts may need to mobilize and facilitate the inter-hukou network to improve migrant mental health.