The volatility and randomness of wind energy limit its large-scale usage in power systems. Accurate short-term wind power prediction can provide effective criteria for wind energy parallel in the grid and provide favorable conditions for the commercial utilization of wind energy. Therefore, the paper proposes a short-term wind power prediction model based on the dragonfly algorithm optimize long-term and short-term neural networks. Firstly, the model preprocesses the collected data and divides the data into a training set and a testing set. Then, the DA used the training set to optimize the relevant hyperparameters in the long and short-term memory neural network. Finally, the DA-LSTM prediction model constructed with excellent hyperparameters will use the test set to obtain the prediction results. The simulation results of the examples show that, compared with the GWO-BP, ELM, and LSTM models, the DA-LSTM model can effectively use time series data for short-term forecasting of wind power and has higher prediction accuracy.