ABSTRACT How does artificial intelligence affect provincial ecological resilience? This study incorporates artificial intelligence, provincial ecological resilience, government environmental attention and public environmental concern into a framework to construct a research model, and selects the panel data of 30 provinces in the Chinese mainland from 2012 to 2021. The multiple regression analysis method is used to empirically analyse the impact of artificial intelligence on provincial ecological resilience, and the moderating roles played by government environmental attention and public environmental concern. The study finds that there is a positive impact of artificial intelligence on provincial ecological resilience, which is confirmed by various robustness tests. Meanwhile, there is a significant promotion role of artificial intelligence for provincial ecological resilience in eastern region, while the promotion role for provincial ecological resilience in non-eastern region is not significant. Government environmental attention and public environmental concern play moderating roles in the impact of artificial intelligence on provincial ecological resilience. Recognizing these findings, policymakers can design targeted support plans to promote the development of artificial intelligence as well as facilitate the roles of government environmental attention and public environmental concern to achieve the enhancement of provincial ecological resilience.