The Internet of Things (IoT) devices are connected to the Internet and are prone to various IoT-based attacks. IoT attack problems cannot be adequately resolved by the existing methods. Additionally, a Software Defined Networking (SDN) based intrusion detection mechanism is proposed in this work because the existing intrusion detection mechanisms are difficult to use. This paper presents a hybrid deep learning method called Extended Hunger Games Search Optimization based on long short-term memory for intrusion detection. Initially, the input data is pre-processed with min-max normalization and one hot encoding. After that, the most significant features are identified using the Extended Wrapper Approach (EWA). Next, Fuzzy logic calculates the probabilities of intrusions such as benign user, attacker, and mixed. The request has been classified using the Dense Bidirectional long short-term memory. In order to fine-tune the parameters of the classification model, Extended Hunger Games search optimization (ExHgO) is utilized. The proposed technique's performance is compared to that of existing techniques in order to demonstrate its efficiency. The proposed technique has an accuracy of 99.5 % for the CIDDS-001 dataset, 98.76 % for the NSL-KDD dataset, 99 % for the KDD cup '99 dataset, and 99.64 % for the UNSW NB15 dataset.