This study empirically examines the effects and mechanisms of AI on green total factor efficiency in energy utilization (GTFEEU) using panel data covering 282 Chinese prefecture-level cities from 2006 to 2021. First, the findings demonstrate that artificial intelligence (AI) can considerably improve GTFEEU. Second, AI enhances GTFEEU through mechanisms of industrial structure upgrading, financial development, and government innovation preference. Third, AI application level is the key determinant of overall GTFEEU, with no significant difference in its impact between resource-based and non-resource-based cities. Furthermore, the effect of AI on improving GTFEEU is more pronounced in large cities than in medium-sized and small cities. Fourth, significant spatial autocorrelation is evident between AI and GTFEEU, and the spatial spillover effect is primarily short-term. This study provides valuable insights for policymakers on the effects and mechanisms of developing AI technology for GTFEEU improvement.