Background: Electrical Submersible Pumps (ESPs) are among the most commonly used artificial lift methods in oil production. However, their high power demands and vulnerability to varying well and power conditions pose operational and economic challenges, particularly in remote or off-grid fields. With the increasing adoption of renewable energy—particularly solar—comes the opportunity to power ESPs cleanly. Yet, the fluctuating nature of solar irradiance creates new complexities that require adaptive and intelligent control to ensure stable and efficient pump performance. Aims: This study aims to design and evaluate an AI-based control system that enhances the efficiency and reliability of solar-powered ESPs. The core objective is to develop a smart control strategy capable of adapting to variations in solar energy while optimizing oil production, reducing energy consumption, and minimizing operational risks. Methods: The approach involves building a comprehensive model that integrates a photovoltaic (PV) system, a Variable Speed Drive (VSD), and the ESP, while accounting for the properties of crude oil. A multi-objective optimization framework is introduced to balance oil production rate, specific energy consumption, and equipment protection. A Model Predictive Control (MPC) strategy is implemented to dynamically adjust pump speed in real-time, guided by live sensor data and solar irradiance forecasts. Results: Simulation results show that the proposed AI-MPC controller significantly outperforms conventional control approaches. It leads to a substantial reduction in specific energy consumption (measured in kWh per barrel), an increase in average daily oil production due to improved uptime, and enhanced system stability under changing solar conditions. Moreover, the controller effectively mitigates risks such as pump shutdowns during intermittent cloud cover by maintaining safer and more efficient operating parameters. These outcomes demonstrate the feasibility of integrating AI-based control with renewable energy systems to achieve sustainable and cost-effective oil extraction.