Introduction The convergence of artificial intelligence (AI) and Environmental, Social, and Governance (ESG) objectives has attracted growing academic and policy interest but remains empirically underexplored due to challenges in accurately measuring firm-level AI adoption. Methods This study refines the LLM-based framework by employing a domain-adapted model (Qwen2.5-72B) and a granular classification scheme to distinguish genuine “Applied” AI technologies from rhetorical mentions in corporate disclosures. Using data from Chinese A-share listed firms between 2009 and 2022, we construct a credible indicator of AI adoption and examine its impact on ESG performance. Results and discussion The results reveal a robust positive relationship between AI adoption and ESG outcomes, primarily driven by enhanced green innovation and improved internal control quality. These effects are more pronounced among large and technology-intensive firms. Consistent with the Resource-Based View and the Technology–Organization–Environment framework, our findings underscore the importance of complementary assets and absorptive capacity in realizing the sustainability potential of AI. This study provides credible evidence on how and for whom AI fosters corporate sustainability, introduces a transparent approach to measuring authentic technology adoption, and highlights the emerging “digital ESG divide” with implications for targeted policy interventions.