Recently, China has advocated for the comprehensive implementation of the new development concept and the enhancement of the national governance system and capacity, particularly in the area of ecology and environmental management. Environmental fee and tax reform has improved China’s modern environmental governance system and deepened the concept of sustainable development of enterprises. In the background of China’s strong call for green transformation and sustainable development, enterprises, as micro subjects in the operation of the market economy, are obliged to balance the concepts of business operation and sustainable development, and to practice and implement the ESG concept. Using a sample of A-share listed companies in China from 2014 to 2022, we conducted an in-depth analysis of the impact of environmental protection tax reform on corporate ESG performance through the difference-in-differences (DID) empirical approach. The results show that (1) the environmental protection fee and tax reform enhances the ESG performance of heavy polluters, and the impact coefficient is around 1.7 to 2.0. The reform exerts the strongest stimulatory effect on the environmental impact (E), with the stimulatory effect being about five times that of the aspect of social responsibility (S). (2) The environmental protection fee and tax reform enhances the ESG performance of heavily polluting firms by promoting green transformation of firms, investor attention, and the government’s focus on the environment. The impact mechanism passes a series of robustness tests, such as the parallel trend test, placebo test, and exclusion of other policy interferences. (3) The environmental protection fee and tax reform enhances the ESG performance of government-owned heavy polluting firms more than private firms. Among different regions, the ESG performance of enterprises in the central region has witnessed the largest improvement margin, while that of enterprises in the western region has the smallest improvement margin.