This study investigates the impact of regional digital economy development on firms' Green Total Factor Productivity (GTFP), aiming to understand its role in enhancing green governance efficiency. Using panel data from Chinese listed firms and cities from 2011 to 2019, we empirically analyse the impact. Our findings reveal that regional digital economy development significantly improves firm GTFP by enhancing technical efficiency, fostering ICT agglomeration, and advancing industrial structure. Additionally, the impact varies based on city traits (e.g. fossil-fuel reliance, low-carbon focus, and Yangtze River Economic Belt location) and firm specifics (e.g. state-owned enterprises and financially constrained firms), as well as market competition. These results highlight the importance of tailored strategies to leverage digitalisation for firm-level green transition, and infer promoting the digital economy, fostering ICT agglomeration, and developing region-specific strategies considering diverse contexts (i.e. city traits, firm specifics and market) to enhance firm GTFP and support sustainable growth.