A hybrid technique that combines an artificial neural network with a particle swarm optimization (ANN+PSO) was used to forecast the disturbance storm time (Dst) index from 1 to 6 h ahead. Our ANN was optimized by PSO to update ANN weights and to predict the short‐term Dst index using past values as input parameters. The database used contains 233,760 hourly data from 1 January 1990 to 31 August 2016, considering storms and quiet period, grouped into three data sets: learning set (with 116,880 hourly data points), validation set (with 58,440 data points), and testing set (with 58,440 data points). Several ANN topologies were studied, and the best architecture was determined by systematically adding neurons and evaluating the root‐mean‐square error (RMSE) and the correlation coefficient (R) during the training process. These results show that the hybrid algorithm is a powerful technique for forecasting the Dst index a short time in advance like t + 1 to t + 3, with RMSE from 3.5 nT to 7.5 nT, and R from 0.98 to 0.90. However, t + 4 to t + 6 predictions become slightly more uncertain, with RMSE from 8.8 nT to 10.9 nT, and R from 0.86 to 0.79. Additionally, an exhaustive analysis according to geomagnetic storm magnitude was conducted. In general, the results show that our hybrid algorithm can be correctly trained to forecast the Dst index with appropriate precision and that Dst past behavior significantly affects adequate training and predicting capabilities of the implemented ANN.