Intrusion detection is a crucial technology in the communication network security field. In this paper, a dynamic evolutionary sparse neural network (DESNN) is proposed for intrusion detection, named as DESNN algorithm. Firstly, an ensemble neural network model is constructed, which is processed by a dynamic pruning rule and further divided into advantage subnetworks and disadvantage subnetworks. The dynamic pruning rule can effectively reduce the subnetworks weight parameters, thereby increasing the speed of the subnetworks intrusion detection. Then considering the subnetworks performance loss caused by the dynamic pruning rule, a novel evolutionary mechanism is proposed to optimize the training process of the disadvantage subnetworks. The weight of the disadvantage subnetworks approach the weight of the advantage subnetworks by the evolutionary mechanism, such that the performance of the ensemble neural network can be improved. Finally, an optimal subnetwork is selected from the ensemble neural network, which is used to detect multiple types of intrusion. Experiments show that the proposed DESNN algorithm improves intrusion detection speed without causing significant performance loss compare with other fully-connected neural network models.