Using global optimization algorithm to optimize the initial weights and thresholds of traditional neural network model can effectively address the problems of premature convergence and lower accuracy. However, the shortcomings such as slower convergence speed and poor local search ability still exist. In order to solve these problems, a neural network model QGA-QGCNN using a Quantum Genetic Algorithm (QGA) to optimize Quantum Gate Circuit Neural Network (QGCNN) is proposed in this paper. In QGA-QGCNN, the initial parameters of QGCNN are optimized for the strong global optimization ability and faster convergence speed by using a QGA. In the proposed model, the normalized results of the predicted sample attributes are transformed into quantum states as the input of the network, and the quantum rotation gate is used to rotate the phase and control the reversal of the target qubits. Finally, the output of the network is obtained by entanglement of multiple qubits in the quantum Controlled-NOT (CNOT) gate. When dealing with more complex problems, the QGCNN model based on quantum computing has specific parallel computing capabilities and can give full play to its ability to blur uncertain problems, thereby improving detection performance. We use the authoritative 10% KDD-CUP99 data set in the field of network intrusion detection to conduct simulation experiments on the proposed QGA-QGCNN model. Experimental results show that the proposed intrusion detection model has lower false alarm rate and significantly accuracy compared to conventional attack detection models. And GQCNN optimized by QGA also improves the convergence performance of the model.