Our study explores how CEOs’ educational attainment affects green innovation at the enterprise level and whether CEO educational attainment and green innovation can improve enterprise performance. To date, few studies have used environmental patents of listed companies to measure green innovation at the micro-level. Furthermore, existing studies have rarely considered the heterogeneity of the enterprise type or social responsibility and institutional intervention. Thus, by using a fixed-effects model, we argue that there is a positive relationship between CEO educational attainment and green innovation. Additionally, CEO education level significantly improves enterprise performance which leads to more sustainable green patent output by influencing green innovation based on data from listed companies in heavily polluting industries in Shanghai and Shenzhen from 2010 to 2018. Moreover, the result is still held after controlling for companies’ fixed effects and using the propensity score matching method (PSM) to eliminate endogenous and sample selection bias. Specifically, we demonstrate the following findings: 1) the positive influence of CEOs’ educational attainment on green innovation behavior is more significant in private enterprises and enterprises with higher social responsibility. 2) Strict environmental legislation can make a positive impact in regions with heavy environmental pollution. 3) Enterprises’ performance and sustainable environmental innovation are promoted by the positive mechanism. Our results not only enrich the literature on the relationship between education and innovation in terms of heterogeneity but also have significance in determining how to reduce pollution from the perspective of environmental governance and enterprise management.