SummaryIn today's world, the Internet of things (IoT) and wireless sensor networks (WSNs) have been integrated into various applications to support reliable communication systems. The IoT nodes collect the sensed data with the aid of WSN and transfer them to the cloud environment. Nevertheless, these nodes become vulnerable when Denial of Service attacks occurred in the IoT‐enabled WSN (IWSN). The insecure route also affects the energy efficiency of IWSN. Therefore, robust intrusion detection along with secure routing is necessitated to protect the IWSN from various security threats. In this paper, a novel Artificial Intelligence‐based Energy‐aware Intrusion Detection and Secure Routing model has been proposed to develop a secured IWSN. Initially, the proposed model executes the intrusion detection system to identify the various attacks. Afterward, a game strategy‐based decision mechanism is integrated with the proposed intrusion detection model to decide whether protection is needed or not. In the last phase, an energy‐aware ad‐hoc on‐demand distance vector algorithm has been established to offer secured routing among multiple nodes. The performance results show that the proposed model achieves superior detection accuracy of 95% and reduced energy utilization of 38% as compared with the existing intrusion detection models.