Cybersecurity threats pose a significant challenge in the realm of the Internet of Medical Things (IoMT). Cyber-attacks on IoMT devices can lead to the deterioration of the patient's health as well as huge financial losses for healthcare organizations. This study aims to classify six distinct IoMT cyberattacks namely Denial-of-Service (DoS), Distributed Denial-of-Service (DDoS), Reconnaissance (Recon), Spoofing, Message Queuing Telemetry Transport (MQTT) and Benign, using the recent CICIoMT2024 dataset. The study utilizes Information Gain (IG) as the feature selection technique and employs Support Vector Machine (SVM), Multidimensional Convolutional Neural Network (MultiD-CNN), Random Forest (RF), and Naive Bayes (NB) classifiers to classify the cyberattacks. MultiD-CNN outperformed all the models achieving the highest 5-fold cross-validation mean accuracy of 98.11%, mean precision of 97.73%, mean recall of 98.21%, and mean F1-score of 97.88% on the reduced feature set. However, all the models showed about 3–5% improvement in all metrics when using a reduced feature set compared to the full feature set. The findings show the significance of feature selection in enhancing the performance of the classifiers on the IoMT dataset.