Artificial intelligence (AI) is reshaping the landscape of sustainable development, offering unprecedented opportunities while introducing systemic risks. This study examines the nonlinear and heterogeneous impacts of AI on sustainable development. Using a projection pursuit model based on genetic algorithms, we quantify national AI development levels and integrate quadratic moderation models and curve simulation to trace the dual trajectories of AI impacts on sustainable development. Our findings uncover distinct non-linear patterns: AI exerts an inverted U-shaped effect on HDI, with structural unemployment, algorithmic bias, and privacy erosion emerging in later stages. Conversely, environmental sustainability follows a U-shaped path: foundational AI technologies, over time, significantly reduce carbon intensity, while applied AI may initially increase emissions due to energy-intensive deployment. Crucially, AI can optimize renewable energy efficiency, while labor market imbalances may undermine AI's positive impact on carbon reduction and social welfare. Income-level heterogeneity further reveals that high-income countries are more capable of translating AI into sustainability dividends, while lower-income economies remain constrained by technological bottlenecks and structural mismatches. This study advances “green AI” by uncovering how AI affects sustainable development, emphasizing the need for joint investments in renewables, skilled labor, and governance to maximize benefits and limit risks. © 2025 Elsevier Ltd