Internet of Things (IoT) and Software-Defined Networking (SDN) are essential technology that enhances network administrations’ performance. Conveniently, SDN offers a simple and centralized system for administering a huge count of IoT devices and significantly decreases the capacity of network administrators. SDN mostly concentrates on upper-level control and network management, but IoT purposes are carrying devices collected to enable share and monitoring real-time performances with network connectivity. However, there is still a requirement for improving security performance in SDN depending on IoT networks to mitigate attacks containing IoT devices like Distributed Denial of Service (DDoS). With this stimulus, this study designs metaheuristics with deep learning-based DDoS attack detection model (MDL-DDoSAM) in the SDN-IoT environment. The presented MDL-DDoSAM technique mainly aims to identify the occurrence of DDoS attacks in the SDN-IoT environment. To accomplish this, the presented MDL-DDoSAM technique initially preprocesses the networking data. In addition, the presented MDL-DDoSAM technique designs the jellyfish search optimizer-based feature selection (JFSO-FS) technique to elect feature subsets. For DDoS attack detection and classification, the Bidirectional CUDA Deep Neural Network Long Short-Term Memory (BiCD-LSTM) model was used. Its hyperparameters are optimally adjusted by an improved whale optimization algorithm (IWOA). The significant DDoS attack detection performance of the MDL-DDoSAM system was tested utilizing a benchmark database, and the results indicate improved performance over other existing models.