Wind energy is known for its uncertainty and volatility, necessitating accurate wind speed prediction for stable wind farm operations. To enhance wind speed prediction accuracy, this study proposes a BP neural network (BPNN) short-term wind speed prediction model based on the Improved Dung Beetle Optimization (IDBO) algorithm. Addressing the issue of local optimization and reduced accuracy in the BPNN optimized by the Dung Beetle Optimization (DBO) algorithm, the circle chaotic mapping is utilized for population initialization to achieve a more uniform initial distribution. The improved sine-cosine algorithm, triangle wandering strategy, and adaptive weight coefficient are then employed to optimize dung beetle positions, balancing global exploration and local development capabilities and improving the algorithm’s search performance. Finally, the improved DBO algorithm optimizes the weights and thresholds of the BPNN, and the IDBO-BPNN prediction model was constructed. Simulation experiments were conducted based on wind speed data from a wind farm in Ohio, USA. The IDBO-BPNN model was compared with other prediction models, and error evaluation indexes were introduced to evaluate the experimental results. The findings demonstrate that the suggested model yields the most accurate predictions and achieves the optimal error evaluation indexes. MAE, MSE, RMSE, NSE and R2 of dataset 1 are 0.42247, 0.28775, 0.53642, 88.8785%, 89.161%, those of dataset 2 are 0.28283, 0.14952, 0.38668, 85.7383%, 86.577%, and those of dataset 3 are 0.45406, 0.39268, 0.62664, 84.3859%, 84.931%. In particular, compared with BPNN model, the five evaluation indexes of the IDBO-BPNN model promoted by 41.53%, 57.38%, 34.71%, 24.91%, and 11.44%, respectively in dataset 3. Therefore, that the proposed IDBO-BPNN model exhibits higher accuracy in short-term wind speed prediction, indicating its feasibility and superiority in the realm of wind energy.