The rapid development of e-commerce,catalyzed by the digital economy,increasingly highlights its intrinsic driving force in the digital transformation of enterprises.This paper takes the construction of national e-commerce demonstration cities as a quasi-natural experiment to explore the impact of the pilot policy of national e-commerce demonstration cities on the digital transformation of enterprises.The results reveal that the pilot policy of national e-commerce demonstration cities significantly enhances the level of digital transformation of enterprises,and this remains valid after a series of robustness tests.The pilot policy has a more noticeable impact on small and medium-sized enterprises,downstream industrial chain enterprises,those located in cities with high market potential,and those in cities with low government fiscal deficits.Cost effect,supply-demand matching effect,productive service industry agglomeration effect,and government attention allocation effect are key intermediate mechanisms.The pilot policy drives the development of the consumer internet and enables it to generate synergistic effect with the construction of the industrial internet to promote the digital transformation of enterprises.Further analysis indicates that the pilot policy mainly exhibits a radiation-driven spatial spillover effect in regions with weaker e-commerce development and promotes the digital transformation of upstream enterprises through the industrial chain spillover effect.The research conclusions provide policy implications for further optimizing e-commerce policy formulation and promoting the high-quality development of enterprises.