PurposeTaking 30 provincial samples from 2001 to 2017 in mainland China as the research objects, this paper aims to evaluate the impact and effects of foreign direct investment (FDI) on the urban–rural income gap and reveals heterogeneity across regions.Design/methodology/approachFirstly, the Theil index is used to measure the income gap between 30 provinces in mainland China from 2001 to 2017, then the spatial econometric model is used to empirically test the impact of foreign direct investment on China’s urban–rural income gap and its heterogeneity across regions. Finally, a robustness test is performed.FindingsThe results show that there is a significant inverted U-shaped relationship between FDI and the urban–rural income gap in China. That is, FDI expands the urban–rural income gap in the short term and helps to converge it in the long term. In the eastern region, FDI has a convergence effect on the urban–rural income gap in the short term, which increases the long term. However, in the central and western regions, the relationship between FDI and urban–rural income gap has a weak inverted U shape.Originality/valueBy assessing the impact of FDI on the urban–rural income gap, this work provides decision-making support for China and other developing countries to improve investment policies and income distribution policies.