Facing the slowdown of global economic growth and trade tensions,the digital economy has bucked the trend and played the role of a“stabilizer”in the trade sector. Based on the data of China’s cities and customs,the relationship between digital economy development and cities’export resilience was examined. The results reveal that the development of the digital economy helps to improve the resilience of cities’export,and the subsequent robustness test and endogenous processing conclusions also support this view. The results of heterogeneity analysis show that the effect of digital economic development on cities’export resilience varies with city location and government governance effectiveness,economic development level and political risk of export destination countries. Mechanism analysis shows that the development of the digital economy can enhance the resilience of cities’export by reducing trade costs,improving innovation capabilities,and enhancing entrepreneurial activity. Further research has found that in the context of external uncertainty shocks,the digital economy can stabilize risks and continuously improve the cities’export resilience. It clarifies the mechanism by which the development of the digital economy enhances the resilience of cities’exports,and the research conclusions provide policy inspirations for cities to promote trade“seek progress while maintaining stability”and achieve high?quality trade development under the background of complex and ever?changing world political and economic situations.