In the era of rapid development of digital economy, based on theoretical analysis, panel data of 30 provincial administrative units in China from 2011 to 2020 are used to explore the relationship between digital economy, foreign direct investment (FDI) and technological innovation; the empirical results show that: first, at the level of provinces, cities and autonomous regions, the development of digital economy has a significant role in promoting technological innovation; second, the digital Second, FDI plays a partially mediating role in the analysis of the mechanism by which the digital economy affects technological innovation; third, there is regional heterogeneity in the impact of the digital economy on technological innovation, and there is a decreasing trend in the significance of the digital economy on technological innovation from the central east to the west, i.e. the digital economy is significant in the central east but not in the west. The study finds that the rapid development of the digital economy contributes to China's overall technological innovation, but as foreign direct investment faces more opportunities and challenges in the new situation, it is necessary to coordinate the systematic planning of the development of the digital economy, adjust the foreign investment strategy to suit local conditions and scientific development, so as to better exploit the innovation stimulating effect of the digital economy.