Compared with the enormous attention paid to the formation of attitudes towards migrants, studies on the social consequences of such attitudes have been insufficient, with the link between attitudes towards migrants and return migration remaining an understudied field both in global and Chinese contexts. Contextual hostility creates social and symbolic barriers in the integration process of migrants and decreases their life satisfaction levels and thus significantly influences many types of migration trajectories. Based on the only available national data for China, this study applies multilevel logistic regression models to examine the relationship between local‐hukou residents' attitudes towards migrants and the intention for return migration among rural‐to‐urban migrants while accounting for socio‐economic heterogeneity in migrants. Results reveal that, for all types of local‐hukou residents, their acceptance of migrants as either friends, neighbours, or family members positively relates to the intention for return migration among rural‐to‐urban migrants; by contrast, it is only hostility from native‐born local‐hukou residents that has a significant and negative effect on rural‐to‐urban migrants, encouraging them to plan to return to their places of origin. Moreover, migrants with different amounts of human capital have varied perceptions of attitudes held by local‐hukou residents, with the younger generation of migrants, highly educated migrants, and business migrants being more sensitive to contextual hostility. Thus, they exhibit a greater tendency towards return migration. This study broadens the understanding of return migration from the perspectives of life satisfaction and psychological integration and suggests creating a more open and friendlier social environment in cities.