Reducing the urban?rural income gap is an important part of China's steady promotion of common prosperity, and this paper studies the intrinsic connection between the level of digital economy development and the urban?rural income gap based on the panel data of 30 provincial?level administrative regions in China from 2013 to 2021. The results of the study show that digital economy is conducive to narrowing the urban?rural income gap, and the rationalization of industrial structure exerts a partial mediating effect; in regions with higher levels of human capital, the development of digital economy can effectively alleviate the urban?rural income gap, and the rationalization of industrial structure plays a complete mediating effect, however, in regions with lower levels of human capital, the digital economy does not have a significant impact; when the level of economic development is low, the digital economy will expand the urban?rural income gap, while when the level of economic development is high, the digital economy will narrow the urban?rural income gap. Based on this, suggestions have been put forward to promote the coordinated development of industrial digitization and digital industrialization, further promoting the rationalization of industrial structure, enhancing the level of human capital, and optimizing the environment for the development of digital economy, in order to maximize the effectiveness of the digital economy in promoting the optimization of industrial structure and narrowing the income gap between urban and rural areas.