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 neural network was improved by the particle swarm optimization algorithm, and a modified particle swarm optimization‐radial basis function algorithm was obtained, which was used as the prediction model. Then, the data from National Internet Emergency Center were used as the experimental data, and the modified particle swarm optimization‐radial basis function algorithm was compared with radial basis function and particle swarm optimization‐radial basis function algorithms. The results showed that the modified particle swarm optimization‐radial basis function algorithm could achieve convergence in about 50 times of iterations, showing a high calculation efficiency and a short operation time, and the mean absolute percentage error value, mean square error value, and root‐mean‐square error value were small (2.13%, 0.0005, and 0.0224), showing that the algorithm had good prediction performance. The results verify the reliability of the modified particle swarm optimization‐radial basis function algorithm in NSSP, which is conducive to further improve network security.