First of all, the principle of neural network is discussed, and the traditional BP network learning algorithm and BP neural network adaptive learning algorithm are researched. Combining the advantages of two algorithms, the distributed neural network self-learning algorithm is proposed, which is a kind of intrusion detection algorithm using the method of distributed learning to optimize the BP neural network algorithm. Using this algorithm to study and test the network intrusion data, it solves the problem that directly using BP learning caused by the training sample size too large and difficult to convergence. At the same time, the sample training time is shortened, and the BP neural network classification accuracy is improved. Secondly, based on the research of the improved algorithm, this paper gives the specific steps of the algorithm, and uses the improved algorithm to establish mathematical model which is used to analyzing and forecasting. Compared with the traditional BP network learning algorithm and BP neural network adaptive learning algorithm, verify the effectiveness and feasibility of the improved algorithm. Finally, the algorithm is applied to intrusion detection. Through appropriate test method, use the sample data of this paper adopted to verify the example. Through the results of the testing data, it verifies the performance of the distributed neural network self-learning algorithm, and comes to the conclusion.