Agricultural productivity remains the backbone of Nigeria's economy, employing roughly a third of the labour force and underpinning the food security of more than 220 million people. Yet yields for staple crops continue to lag well behind agronomic potential, and production is increasingly destabilised by climate variability, soil degradation, market shocks and weak access to timely information. This article examines how machine learning (ML) models can be applied to forecast agricultural productivity in Nigeria, offering decision-makers, farmers and agribusinesses earlier and more reliable estimates of crop output. Drawing on the wider scientific literature and on representative empirical patterns, the article reviews the principal data sources meteorological records, soil surveys, satellite remote sensing, and household and farm-level surveys and the dominant modelling families, including multiple linear regression, support vector regression, random forests, gradient-boosted trees, artificial neural networks and recurrent architectures such as long short-term memory (LSTM) networks. Comparative evidence indicates that ensemble and deep learning models routinely outperform traditional statistical approaches, with coefficients of determination above 0.85 and substantial reductions in root mean squared error. The article presents an end-to-end forecasting workflow, discusses feature importance and yield-gap analysis across Nigeria's agroecological zones, and critically appraises the barriers to adoption: fragmented data infrastructure, limited digital skills, connectivity gaps and concerns around interpretability and trust. It concludes with a roadmap for embedding ML-driven forecasting into Nigeria's agricultural extension, insurance and policy systems. The findings suggest that, when paired with investment in data systems and human capacity, machine learning can materially strengthen food security planning and rural livelihoods in Nigeria