The Internet of Things (IoT) is today’s rapidly growing technology that consists of a massive number of smart devices. The advent of IoT has brought about huge prospects of innovation and opportunities on the domestic as well as industry levels. However, there are vulnerabilities and weaknesses of IoT that inflame concerns about security and privacy issues. Enhancing the security of IoT networks is a critical issue and Intrusion Detection Systems (IDS) become the forefront solution in safeguarding the network from different malicious attacks. In this work, we tackle the emerging anomaly detection problem in IoT using Artificial Intelligence, more precisely a deep learning scheme called Convolutional Neural Network (CNN). The CSE-CIC-IDS 2018 dataset provided by the Canadian Institute of Cybersecurity was used for the experimental analysis. According to the study, the suggested approach outperforms the existing machine learning-based algorithms, with a low false alarm rate and better detection rate in the detection of attacks.