The continuous increase in energy consumption has made the potential of wind-power generation tremendous. However, the obvious intermittency and randomness of wind speed results in the fluctuation of the output power in a wind farm, seriously affecting the power quality. Therefore, the accurate prediction of wind power in advance can improve the ability of wind-power integration and enhance the reliability of the power system. In this paper, a model of wavelet decomposition (WD) and weighted random forest (WRF) optimized by the niche immune lion algorithm (NILA-WRF) is presented for ultra-short-term wind power prediction. Firstly, the original serials of wind speed and power are decomposed into several sub-serials by WD because the original serials have no obvious day characteristics. Then, the model parameters are set and the model trained with the sub-serials of wind speed and wind power decomposed. Finally, the WD-NILA-WRF model is used to predict the wind power of the relative sub-serials and the result is reconstructed to obtain the final prediction result. The WD-NILA-WRF model combines the advantage of each single model, which uses WD for signal de-noising, and uses the niche immune lion algorithm (NILA) to improve the model's optimization efficiency. In this paper, two empirical analyses are carried out to prove the accuracy of the model, and the experimental results verify the proposed model's validity and superiority compared with the back propagation neural network (BP neural network), support vector machine (SVM), RF and NILA-RF, indicating that the proposed method is superior in cases influenced by noise and unstable factors, and possesses an excellent generalization ability and robustness.