Sustainable development is crucial for enterprises' long-term development and influences broader socio-economic outcomes. The ESG performance is essential for assessing enterprises' sustainable development. Executives, as crucial implementers of corporate strategy, play an indispensable role in the pursuit of sustainable development. However, the impact of executives' military background on enterprise ESG performance remains understudied and lacks consensus in the existing literature. Therefore, this study examines the logical relationship between top managers' military experience and Chinese enterprises' performance concerning environmental protection, social responsibility and corporate governance (ESG) using data from 4543 publicly traded companies between 2010 and 2021. The results demonstrate that top managers' military experience is positively correlated with enterprises' ESG performance. The promotional impact of the baseline regression indicates that the effect is primarily imparted through enterprises' governance, including profit, total revenue and net profit. Heterogeneity tests show that top managers' military experience is a more effective means to promote enterprises’ ESG performance in high research and development investing enterprises, small enterprises, those with female directors and enterprises in central and western China. This study not only enriches the understanding of the economic implications of executive military experience, but also provides theoretical support for enterprises to formulate relevant policies and construct management teams to improve their ESG performance and achieve sustainable development.