Background: The goal of “peak carbon and carbon neutrality” has pointed out the direction for the digital transformation (DIT) of enterprises. Companies need to pay a price when they seek green development or fulfill environmental responsibility. Out of self-interest, enterprises may exaggerate their environmental performance (EP) and then greenwashing behavior appears. Whether DIT can curb greenwashing behavior is a topic worth discussing.Objective: This paper proposes a theoretical framework for the influence of DIT on greenwashing and further discusses how government subsidies, resource slack, and external pressure affect them. The data of China’s listed A - share companies are used to test this theoretical framework.Methods: In this paper, multiple linear regression method is used to test the theoretical mechanism, and Hausman test and instrumental variable method are used to test the correctness of the conclusions.Results: (1) DIT has an inhibitory effect on greenwashing. (2) Government subsidies, resource slack, and public pressure positively moderate the relationship. (3) The effect of DIT does inhibit symbolic behavior, but the impact on substantive behavior is not obvious. The moderating effects of various variables are also different.Discussion: It is suggested that the government take the lead in building more digital public participation platforms to improve the online monitoring and early warning ability of enterprises’ greenwashing behavior, tourge enterprises to configure more intelligent and digital cleaner production equipment and facilities, and to improve their environmental performance. Local governments are encouraged to seize the trend of enterprises’ digital green transformation, introduce more government subsidy policies for DIT, improve digital infrastructure and digital intellectual property protection, and escort enterprises’ green DIT. The government and the banks should cooperate to give more green preferential loans, tax relief, and other measures to enterprises undergoing green DIT.