Nowadays, there are ample amounts of Internet of Things (IoT) devices interconnected to the networks, and with technological improvement, cyberattacks and security threads, for example, botnets, are rapidly evolving and emerging with high-risk attacks. A botnet is a network of compromised devices that are controlled by cyber attackers, frequently employed to perform different cyberattacks. Such attack disrupts IoT evolution by disrupting services and networks for IoT devices. Detecting botnets in an IoT environment includes finding abnormal patterns or behaviors that might indicate the existence of these malicious networks. Several researchers have proposed deep learning (DL) and machine learning (ML) approaches for identifying and categorizing botnet attacks in the IoT platform. Therefore, this study introduces a Botnet Detection using the Chaotic Binary Pelican Optimization Algorithm with Deep Learning (BNT-CBPOADL) technique in the IoT environment. The main aim of the BNT-CBPOADL method lies in the correct detection and categorization of botnet attacks in the IoT environment. In the BNT-CBPOADL method, Z-score normalization is applied for pre-processing. Besides, the CBPOA technique is derived for feature selection. The convolutional variational autoencoder (CVAE) method is applied for botnet detection. At last, the arithmetical optimization algorithm (AOA) is employed for the optimal hyperparameter tuning of the CVAE algorithm. The experimental valuation of the BNT-CBPOADL technique is tested on a Bot-IoT database. The experimentation outcomes inferred the supremacy of the BNT-CBPOADL method over other existing techniques with maximum accuracy of 99.50%.