Using the National Civilized City Award campaign as a quasi-natural experiment, we evaluate the effect of establishing civilized cities in China on migrants' residence intention and explore its mechanism. Based on the data from the China Migrants Dynamic Survey for 2012–17 and propensity score matching and difference-in-difference approach, creating civilized cities reduced migrants' residence intention. The mechanism shows that creating civilized cities brought higher amenities while decreasing income and increasing housing costs. This effect showed individual and city heterogeneity: low-skilled and rural hukou migrants' residence intention was significantly reduced, while high-skilled and urban hukou migrants experienced no significant impact; large and midwestern cities experienced reduced attractiveness for migrants compared with small, medium-sized, and eastern cities. We show how cities affect individuals' residence intention and provide empirical evidence for the reasonable and effective formulation of urban management policies.