Internet of Things (IoT) and its applications have gained importance in recent times of research. The heterogeneous nature of IoT networks makes them applicable for various real-time applications and has become inseparable in everyone’s life. Although these IoT devices simplify day to day life activities, these networks are vulnerable to many security threats. Current insufficient security measures make the IoT networks the weakest links for defending the security attacks and, therefore, exciting targets to various attackers. A novel intrusion detection system (IDS) is proposed using powerful deep learning models. Motivated by Long Short Term Memory (LSTM) advantages, whale integrated LSTM (WILS) networks have been proposed to design intelligent IDS to detect the range of different scenarios of threats on IoT networks. The system comprises four essential functions: (i) Data collection unit, which profiles the regular performance of IoT devices connected in the networks, (ii) identifies the malicious devices on the network when an attack is happening, (iii) predicts the type of attacks deployed in the network. The extensive assessments of proposed IDS are done in terms of validation methods and protruding metrics for the various scenarios of IoT threats. The real-time scenario of IoT networks under various attacks has been developed with OMENT-python API, which has been used to analyze the different features of normal malicious nodes in the network. In addition, popular datasets such as CIDDS-001, UNSWNB15, and KDD datasets are used for benchmarking the proposed model. Further, we have employed extensive experiments to evaluate the proposed models and the other existing learning models. The WILS models have outdone the other existing intelligent models in accuracy, precision, and recall, proving their susceptibility for an IoT network. © 2021, The Author(s), under exclusive licence to Springer-Verlag London Ltd., part of Springer Nature.