Abstract:The green transformation of industrial firms is widely recognized as crucial. Using the establishment of environmental courts as a quasi-natural experiment, an investigation is conducted into how strengthened environmental rule of law addresses green transformation challenges. Existing measurements of corporate green transition face notable limitations: proxy variables and comprehensive indices offer limited coverage, while text analysis methods relying on predefined dictionaries struggle with complex semantics. To address these issues, an innovative approach utilizing large language models to analyze annual reports is adopted to construct a corporate green transition indicator. Based on data from Chinese listed industrial enterprises (2004-2023), the establishment of environmental courts is employed to examine how strengthened environmental rule of law resolves green transition challenges. Through a staggered DID methodology, it is revealed that environmental court establishment significantly promotes corporate green transition, with more pronounced effects observed in state-owned enterprises, large firms, and those located outside the Yangtze River Economic Belt or in low-rule-of-law regions. Mechanism analysis shows this transition is driven through external oversight and internal governance channels. It is further found that environmental court establishment contributes to reduced pollution emissions, and that corporate green transition subsequently mitigates idiosyncratic risks. Theoretical support is thus provided for strengthening environmental rule of law, and new pathways are offered for achieving industrial green transformation.