The rapid advancement of artificial intelligence (AI) in the 21st century is driving profound societal changes and playing a crucial role in optimizing energy systems to achieve carbon neutrality. Most G20 nations have developed national AI strategies and are advancing AI applications in energy, manufacturing, and agriculture sectors to meet this goal. However, disparities exist among these nations, creating an "AI divide" that needs to be addressed for regulatory consistency and fair distribution of AI benefits. Here, we look at the linear effects of AI and the Paris Agreement (AI), as well as their potential interaction on carbon neutrality. We also investigate whether geopolitical risk (GPR) can hinder or enhance efforts to attain carbon neutrality through energy transition (ET). To measure carbon neutrality of G20 countries, we employed a robust parametric Malmquist index combined with the fixed-effect panel stochastic frontier model to account for heterogeneity. Results indicate that from 1990 to 2022, carbon neutrality has improved primarily due to technological advancements. Developed G20 countries led in technological progress, while developing countries showed modest gains in carbon efficiency. Using the Driscoll-Kraay robust standard error method, we found that AI has a positive but insignificant linear effect on carbon neutrality. However, the interaction between PA and AI was positive and statistically significant, suggesting that PA augments AI's potential in accelerating carbon neutrality. Energy transition accelerates carbon neutrality in both developed and developing G20 countries. However, the role of energy transition in achieving carbon neutrality becomes negative when the interaction term between energy transition and geopolitical risk (ET × GRP) is incorporated. Regarding control variables, green innovation positively impacts carbon neutrality, whereas financial development has an insignificant effect. Industrial structure and foreign direct investment both negatively affect carbon neutrality, thereby supporting the pollution haven hypothesis. It is recommended that strategies to bridge the "AI divide" and uphold geopolitical stability are crucial to achieve carbon neutrality.