People always pay attention to the security of the network. This paper mainly analyzed the problem of network security situation prediction (NSSP). The Radial Basis Function (RBF) neural network was improved by the particle swarm optimization (PSO) algorithm, and a modified PSO (MPSO)-RBF algorithm was obtained, which was used as the prediction model. Then, the data from National Internet Emergency Center (CNCERT/CC) were used as the experimental data, and the MPSO-RBF algorithm was compared with RBF and PSO-RBF algorithms. The results showed that the MPSO-RBF algorithm could achieve convergence in about 50 times of iterations, showing a high calculation efficiency, and the mean absolute percentage error (MAPE) value, mean square error (MSE) value, and root-mean-square error (RMSE) value were small, 2.13%, 0.0005, and 0.0224, respectively, showing that the algorithm had good prediction performance. The results verify the reliability of the MPSO-RBF algorithm in NSSP, which is conducive to further improve network security.