Electrocardiogram (ECG) is a crucial tool for identifying cardiovascular diseases. However, manual evaluation of ECG signals can be tedious and time-consuming, especially when dealing with a large number of cardiac patients. To address this challenge, this study presents a model that categorizes ECG signals into three distinct classes based on their morphological characteristics. Our approach utilizes non-linear features extracted through a convolutional neural network (CNN). The proposed 1D-CNN model architecture comprises three convolutional layers, max pooling layers, and dense layers. This structure automatically extracts distinctive non-linear features from ECG signals and classifies them into five categories: Normal (Normal Beat), Supraventricular ectopic beats and Ventricular ectopic beats. We evaluated our algorithm using the open-source MIT-BIH database and 5-fold cross-validation. The model achieved an accuracy of 97% and an F1 score of 99%.