The internet of things (IoT) has gained great importance due to its applicability in various daily life applications and its flexible and scalable framework. The wide and spreading use of IoT in the last few years has attracted intruders, who were able to take advantage of the vulnerabilities of any IoT framework due to the absence of robust security protocols. This discourages current and probable investors. Out-of-date intrusion detection models are mainly developed to support information technology systems using built-in, predefined patterns or highly imbalanced datasets. Over the past decade, deep learning models have outperformed traditional machine learning models in attack detection tasks. The biggest challenge in detecting zero-day attacks is determining the best deep-learning classifier. Numerous research initiatives have combined ensemble learning to improve performance, avoid overfitting, and minimize errors. In this work, to address this research gap, we propose a new enhanced meta-learning ensemble deep learning model based on stacking that combines the baseline deep learning models using two tiers of meta-classifiers. Then, conducting several experiments on two recent huge-size different IoT benchmark datasets to evaluate the performance of the proposed model. Different baseline deep learning classifiers are trained for each dataset, and their performance is compared to the proposed ensemble model. The findings show that the proposed ensemble model significantly enhances the classification accuracy of baseline deep-learning models.