Network intrusion detection system (NIDS) can effectively sense network attacks, which is of great significance for maintaining the security of cyberspace. To meet the requirements of efficient and accurate network status monitoring, a NIDS model using Transformer-based fusion deep learning architecture is proposed. Firstly, GAN-Cross is used to expand minority class sample data, thereby alleviating the issues of imbalanced minority class about the original dataset. Then, the Transformer module is used to adjust the ML-CNN-BiLSTM model to enhance the feature encoding ability of the intrusion model. Finally, the data enhancement model and feature enhancement model are integrated into the NIDS model, the detection model is optimized, the features of network state data are extracted at a deeper level, and the generalization ability of the detection model is enhanced. Some simulation experiments using UNSW-NB15 datasets show that the proposed fusion architecture can achieve efficient analysis of complex network traffic datasets, with an accuracy of 0.903, effectively improving the detection accuracy of NIDS and its ability to detect unknown attacks. The proposed model has good application value in ensuring the stable operation of network systems.