The proliferation of Internet of Things (IoT) devices has led to an increase in the number of malware attacks targeting these devices. Traditional security mechanisms such as firewalls and antivirus software are often inadequate in protecting IoT devices from malware attacks due to their limited resources and the heterogeneity of IoT networks. In this paper, we propose DeepSecureIoT, a deep learning-based framework for securing IoT against malware attacks. Our proposed framework uses a deep convolutional neural network (CNN) to extract features from network traffic and classify it as normal or malicious. The CNN is trained using a large dataset of network traffic to accurately identify malware attacks and reduce false positives. We evaluate the performance of DeepSecureIoT using a benchmark dataset of real-world IoT malware attacks. The results show that our proposed framework achieves an accuracy of 0.961 in detecting and classifying malware attacks, outperforming state-of-the-art intrusion detection systems. Moreover, DeepSecureIoT has low computational overhead and can be deployed on resource-constrained IoT devices.