The neural network optimized by genetic algorithm(GA) is an efficient and accurate prediction method, which can quickly find the optimal solution through high-speed computing capability and self-learning function. The neural network model optimized by GA is applied to the prediction of soil moisture of ecological slope protection, which provides reference for practical application of slope vegetation screening. In this paper, nine meteorological factors and soil moisture data were obtained by field monitoring instruments and related meteorological data. Considering the lag of meteorological factors, the neural network optimized by GA is used to predict the soil moisture of 8 meteorological data. The results show that the root mean square error (RMSE) and the mean absolute percentage error (MAPE) of the prediction model are 0.22726 and 0.41234%, respectively, indicating that the prediction model runs well. Through V-fold cross-validation, it is found that the prediction results of the model is accurate and stable. The algorithm combining artificial neural network and GA can well predict the soil moisture of ecological slope protection, with high prediction accuracy, and has a good application prospect in other fields.