Modelling drought is vital to water resources management, particularly in arid areas, to reduce its effects. Drought severity and frequency are significantly influenced by climate change. In this study, a novel hybrid methodology was built, data preprocessing and artificial neural network (ANN) combined with the constriction coefficient-based particle swarm optimisation and chaotic gravitational search algorithm (CPSOCGSA), to forecast standard precipitation index (SPI) based on climatic factors. Additionally, the marine predators algorithm (MPA) and the slime mould algorithm (SMA) were used to validate the performance of the CPSOCGSA algorithm. Climatic factors data from 1990 to 2020 were employed to create and evaluate the SPI 1, SPI 3, and SPI 6 models for Al-Kut City, Iraq. The results indicated that data preprocessing methods improve data quality and find the best predictors scenario. The performance of CPSOCGSA-ANN is better than MPA-ANN and SMA-ANN algorithms based on various statistical criteria (i.e., R2, MAE, and RMSE). The proposed methodology yield R2 = 0.93, 0.93, and 0.88 for SPI 1, SPI 3, and SPI 6, respectively.