Green innovation is an essential strategy for businesses to gain a competitive edge and attain long-term sustainable growth. It does, however, often run into money problems. The rapid advancement of digital technology provides organizations with potent tools to get external resources through digital transformation, surmount resource obstacles, and promote environmentally-friendly innovation. The impact mechanism, however, necessitates additional elucidation. This article analyzes the data of Chinese A-share listed firms from 2012 to 2022, using resource dependence theory and stakeholder theory. This study examines how digital transformation affects the ability of organizations to innovate in environmentally friendly ways by focusing on the acquisition of external resources. Research has shown that digital transformation may significantly improve the quantity and quality of green innovation in businesses. Moreover, the findings of the intermediate impact study indicate that digital transformation has the potential to enhance the green innovation capacity of businesses by improving their environmental, social, and governance (ESG) standards. Concurrently, we noticed that the level of openness in disclosing environmental information by corporations and the quality of partnerships between the government and enterprises play a positive role in influencing the effects of digital transformation on the ability to innovate in environmentally friendly ways. Based on the findings of our research, we provide fresh perspectives and policy suggestions to assist business managers and governments in fostering environmentally-friendly innovation in enterprises.