Aiming at the problems of low detection rate and high false detection rate of intrusion detection algorithms in the traditional cloud computing environment, an intrusion detection-data security protection scheme based on particle swarm-BP network algorithm in a cloud computing environment is proposed. First, based on the four modules of data collection, data preprocessing, feature selection, and intrusion detection, the overall framework of the intrusion detection model is constructed by designing corresponding functions. Then, by introducing the decision tree algorithm, the overfitting is reduced and the data processing speed of the model is improved, and on this basis, the feature selection is carried out through the “gain rate” optimization method, which reduces the redundant information of the feature vector. Finally, by introducing the Particle Swarm Optimization (PSO) algorithm into the optimization of the initial weights and thresholds of the BP neural network, the BP neural network is improved based on the momentum factor and adaptive learning rate, and the high detection rate and low false detection rate are realized. Through simulation experiments, the proposed intrusion detection method and the other three methods are compared and analyzed under the same conditions. The results show that the detection rate and false detection rate of the method proposed in this paper are the best under five different types of sample data, the highest detection rate reaches 95.72%, and the lowest false detection rate drops to 2.03%. The performance of the proposed algorithm is better than that of the other two comparison algorithms.