With the introduction of computer technology, network attacks have become more frequent. Some illegal elements may intrude into computers through network attacks to tamper with messages, spread viruses and other destructive behaviors, causing great damage to personal sensitive information, industrial control networks, transaction systems, etc. . For this, this design proposes an improved intrusion detection method based on feature selection and integrated model. The NSL-KDD training data set is used to evaluate the proposed model. First, balance the data categories through the SMOTE-ENN method, and then use feature selection technology and PCA feature extraction technology to reduce the number of irrelevant features and improve the classification accuracy. Finally, using CART as the base classifier, Bagging technology is used to establish an integrated model and an intrusion detection system. Experimental results show that the CART-based Bagging method provides better accuracy, lower false alarm rate and faster model training speed, and the system can detect intrusion attacks with similar attributes and has a certain degree of adaptability.