Improving corporate ESG performance is regarded as a useful means to promote low-carbon transformation. Based on executive echelon theory, this study uses textual analysis to identify the executives’ environmental background characteristics and explores the impact on the company’s ESG performance, using data on China’s A-share listed companies from 2009 to 2021. The empirical results show that (1) the environmental background of executives has a positive impact on the enterprise’s ESG performance, and a series of robustness tests reconfirm this finding. (2) The mediating effect model shows that the executives’ environmental background can trigger environmental investment and the green innovation effect, improving the enterprise’s ESG performance. (3) The heterogeneity analysis shows that the impact of the environmental background of executives on the firm’s ESG performance is more sensitive in non-state-owned and heavily polluting enterprises. (4) Improving corporate ESG performance can also promote economic performance and achieve the dual goals of the “environment + economy”. The conclusions in this study provide a theoretical basis and practical enlightenment for the government to formulate environmental policies.