This study examines the multifaceted impact of artificial intelligence (AI) on environmental sustainability, specifically targeting ecological footprints, carbon emissions, and energy transitions. Utilizing panel data from 67 countries, we employ System Generalized Method of Moments (SYS-GMM) and Dynamic Panel Threshold Models (DPTM) to analyze the complex interactions between AI development and key environmental metrics. The estimated coefficients of the benchmark model show that AI significantly reduces ecological footprints and carbon emissions while promoting energy transitions, with the most substantial impact observed in energy transitions, followed by ecological footprint reduction and carbon emissions reduction. Nonlinear analysis indicates several key insights: (i) a higher proportion of the industrial sector diminishes the inhibitory effect of AI on ecological footprints and carbon emissions but enhances its positive impact on energy transitions; (ii) increased trade openness significantly amplifies AI’s ability to reduce carbon emissions and promote energy transitions; (iii) the environmental benefits of AI are more pronounced at higher levels of AI development, enhancing its ability to reduce ecological footprints and carbon emissions and promote energy transitions; (iv) as the energy transition process deepens, AI’s effectiveness in reducing ecological footprints and carbon emissions increases, while its role in promoting further energy transitions decreases. This study enriches the existing literature by providing a nuanced understanding of AI’s environmental impact and offers a robust scientific foundation for global policymakers to develop sustainable AI management frameworks.