This study investigates the influence of business strategy on green total factor productivity (GTFP), focusing on the mediating effect of digital transformation and the moderating effect of organizational legitimacy. Leveraging micro-data from China’s listed industrial enterprises spanning from 2011 to 2021, findings reveal: (1) Prospector strategies exhibit a greater propensity to enhance GTFP compared to defender strategies. (2) Digital transformation partially mediates between business strategy and GTFP. (3) Organizational legitimacy moderates between business strategy and GTFP. Specifically, when a company possesses robust financial standing (pragmatic legitimacy), a better environmental track record (moral legitimacy), and establishment of Environmental Management System certification (cognitive legitimacy), the positive relationship between business strategy and GTFP is strengthened. (4) Further research indicates that business strategy exerts a more pronounced effect on enhancing GTFP for companies with larger scales and weaker political connections, as well as those situated in regions characterized by high fiscal revenue and favorable legal environments.