The current network security situation is becoming more and more severe. In order to improve the accuracy of network security situation prediction, a network security situation prediction method based on crowd search algorithm optimized BP neural network is proposed. This algorithm uses the four characteristics of egoism, altruism, pre-action and uncertain reasoning unique to the crowd search algorithm to determine the search strategy, finds the best fitness individual, obtains the optimal weights and thresholds, and then performs random initialization of the BP neural network The threshold and weight are assigned, and the predicted value is obtained after neural network training. Finally, it is compared with the predicted value obtained by the other two optimization algorithms. Experiments show that the algorithm used in network security situation prediction has higher accuracy, smaller errors, and better stability.