This paper selects listed companies from the Shanghai and Shenzhen A-share markets between 2009 and 2020 as the sample to empirically analyze the impact of corporate performance in ESG (Environmental, Social, and Governance) on the level of their earnings management activities. The study finds that the better the ESG performance, the lower the company's tendency to engage in real earnings management, significantly reducing the level of real earnings management. In contrast, the improvement in ESG performance increases accrual-based earnings management. Further analysis reveals that for non-state-owned enterprises, the restraining effect of ESG performance is more pronounced. All three dimensionsenvironment, social, and governancecan significantly increase corporate accrual-based earnings management. Compared to environmental responsibility, social responsibility and corporate governance are more effective in significantly reducing real earnings management.