PurposeThe digital economy is expected to revive the countryside and reduce the current level of urban–rural inequality. Nevertheless, whether rural e-commerce can narrow the urban–rural income gap still requires further analysis. The purpose of this paper is to clarify whether this goal is, in fact, being achieved.Design/methodology/approachTaobao villages have become the epitome of rural e-commerce development in China. Therefore, this paper matches the data of Taobao villages and the data of prefecture-level cities from 2014 to 2019, and employs a two-way fixed effect model, nonlinear model, instrumental variable model and interactive fixed effects model to explore the impact of rural e-commerce on the urban–rural income gap.FindingsFirstly, the ability of urban residents to share rural e-commerce development is higher than that of rural residents, which actually widens the urban–rural income gap. Secondly, the migration to cities of rural families that have profited from e-commerce, and the return of working-class people to the countryside, are two factors that are contributing to the widening of the urban–rural income gap. Thirdly, the farther the distance from the urban area and the higher the spatial agglomeration of the rural e-commerce cluster is, the weaker the impact on widening the urban–rural income gap will be. Finally, while industrial-led rural e-commerce is responsible for widening the urban–rural income gap, agricultural-led rural e-commerce has no significant impact on the urban–rural income gap.Originality/valueTo the best of the authors' knowledge, this paper is the first to analyze the impact of rural e-commerce on the urban–rural income gap from the perspective of the coverage of Taobao villages. This empirical study will enrich existing theoretical perspectives on urban–rural integration under the backdrop of the digital economy.