Artificial Intelligence (AI) is revolutionizing smart city initiatives by enhancing urban planning and resource management. This study explores AI’s impact on optimizing urban systems in Lagos, Nigeria, a rapidly urbanizing megacity. Using a mixed-methods approach, including surveys of 600 residents and interviews with 25 urban planners, the research examines AI’s role in traffic management, waste management, and energy allocation. Statistical analyses, including ANOVA and logistic regression, reveal that AI-driven solutions improve resource efficiency by 32% and resident satisfaction by 28%. However, challenges such as data privacy, high implementation costs, and digital literacy gaps persist. The findings contribute to the global discourse on smart cities, offering actionable recommendations for AI integration in developing urban contexts.