Oil production forecasting is an important task to manage petroleum reservoirs operations. In this study, a developed time series forecasting model is proposed for oil production using a new improved version of the adaptive neuro-fuzzy inference system (ANFIS). This model is improved by using an optimization algorithm, the slime mould algorithm (SMA). The SMA is a new algorithm that is applied for solving different optimization tasks. However, its search mechanism suffers from some limitations, for example, trapping at local optima. Thus, we modify the SMA using an intelligence search technique called opposition-based learning (OLB). The developed model, ANFIS-SMAOLB, is evaluated with different real-world oil production data collected from two oilfields in two different countries, Masila oilfield (Yemen) and Tahe oilfield (China). Furthermore, the evaluation of this model is considered with extensive comparisons to several methods, using several evaluation measures. The outcomes assessed the high ability of the developed ANFIS-SMAOLB as an efficient time series forecasting model that showed significant performance.