Cyber-attack detection is crucial for assuring computer network security. Contemporary research is based on the supervised learning paradigm for cyber-attack detection. Supervised learning techniques require labeled data for training, which may be costly and time-consuming to gather. Furthermore, these methods are rigid and do not adapt effectively to changing data or new circumstances, their use in dynamic contexts is limited. Intrusion detection systems (IDS) are crucial for assuring computer network security. To address this vulnerability, deep learning (DL) has emerged as a viable alternative method to standard cyber-attack detection systems, which depend on supervised learning algorithms to identify network data. The proposed model implements Deep Q-Network (DQN) algorithm because it can learn to detect threats based on network traffic data without depending on predetermined rules or signatures. An adversarial mechanism is included into the DQL-based training process. A deep Q-network agent is trained to identify intrusions by maximizing the anticipated reward function in this manner. The agent interacts with the network environment and learns to differentiate between normal network traffic and cyber-attacks. Another deep Q-network agent is added to generate adversarial data throughout the training process by causing perturbations in the regular and attack data. The proposed model was compared with the state of the art techniques convolutional neural network (CNN) and multilayer perceptron (MLP). The DQN outperformed other models with high accuracy and a low false positive rate.