The software-defined wireless sensor network (SDWSN) has the potential to improve flexibility, scalability, and network performance, but security and quality of service (QoS) are major challenges due to attackers, poor network management, and inefficient route selection. Several existing works for intrusion detection had drawbacks like poor security, inefficient network management, higher energy consumption and latency, and lesser throughput. A modified honeycomb structure-based intrusion detection system for SDWSN is proposed to address these challenges, which includes secure authentication using the 3D cube algorithm, modified honeycomb-based network partitioning, clustering, reinforcement learning-based intelligent routing with a transfer learning-based deep Q network (TLDQN), and a hybrid intrusion detection system. The latter detects malicious nodes using a driver training-based optimization (DTO) algorithm and intrusions with a bidirectional generative adversarial network (Bi-GAN). The results show that the proposed system outperforms existing solutions in terms of security, network performance, and efficiency. The simulation of this research is conducted by NS-3.26 Network Simulator, and the performances are evaluated based on various performance metrics (with respect to the total number of nodes) like energy consumption, latency, throughput, packet delivery ratio, network lifetime, computation overhead, detection accuracy, packet drop ratio, and control overhead, which proved that the proposed work achieves superior performance compared to existing works. The evaluation also includes a total simulation period during which the system's real-time performance was conducted. Time-based metrics such as precision, recall, and F1score, as well as confusion matrices, are utilized to analyze the system's effectiveness in real-time in response to dynamic network threats.