The classification of electrocardiogram (ECG) waveform segmentation techniques can be difficult due to physiological variation of heart rate and different characteristics of the different ECG waves in terms of shape, frequency, amplitude, and duration. The P-wave, PR-segment, QRS-complex, ST-segment, and T-wave are extracted as the feature for classification algorithm to diagnose specified cardiac disorders. This requires the implementation of algorithms that identify specific points within the ECG wave. Some previous computational algorithms for automatic classification of ECG segmentation are proposed to overcome limitations of manual inspection of the ECG. This study presents new insight into the ECG semantic segmentation problem is surmounted by a deep learning approach for automatic ECG wave-form. Long short-term memory (LSTM) is proposed for this task. This experimental study has been performed for six different waveforms of ECG signal that represents cardiac disorders obtained from the Physionet: QT database. Overall, LSTM performance achieved accuracy, sensitivity, specificity, precision, F1-score, is 93.36%, 86.85%, 95.78%, 81.79%, and 83.09%, respectively.