Due to the nonlinearity, non-stationarity and noise interference of the rolling bearing fault signals of wind turbines, the extraction of features is challenging. This paper proposes a fault diagnosis method for wind turbine bearings based on the improved dung beetle optimizer (IDBO) optimized Long Short-Term Memory (LSTM) network. Firstly, Levy flight strategy and T-distribution perturbation strategy are integrated into the traditional dung beetle optimizer (DBO) to optimize the algorithm. The optimized IDBO algorithm solves the problems of low convergence accuracy and easy entrapment into local optima in the traditional dung beetle algorithm. Secondly, the IDBO algorithm is combined with the long short-term memory method to build the IDBO-LSTM fault diagnosis model. The advantage of fewer parameters in this algorithm enables the model to reduce the overall number of parameters and computational complexity while ensuring the accuracy of temporal feature extraction. Finally, this pa-per takes the bearing open dataset of Case Western Reserve University as an example to compare the proposed method with other models through optimization tests. The experimental results show that the IDBO-LSTM model outperforms other models, with a fault diagnosis accuracy rate of 98.3%. This demonstrates the superiority of the proposed improved dung beetle optimizer and effectively improves the accuracy of fault diagnosis for rolling bearings of wind turbines.