This study investigates the application of Artificial Intelligence (AI) techniques in soil fertility assessment and crop yield prediction in Southwest Nigeria. Traditional soil analysis methods are often time-consuming, expensive, and limited in predictive capability. This research integrates machine learning models to analyse soil parameters such as pH, nitrogen, phosphorus, potassium, and organic matter content to predict crop yield outcomes. Data were obtained from selected agricultural zones in Osun and Oyo States. Supervised learning algorithms including Linear Regression, Random Forest, and Support Vector Machines were employed. The results indicate that AI-based models significantly improve prediction accuracy compared to conventional statistical approaches, with Random Forest outperforming other models. The study demonstrates that AI can enhance decision-making in precision agriculture, optimize fertilizer application, and improve food security. It is recommended that stakeholders adopt AI-driven soil analysis systems to boost agricultural productivity in Nigeria.