Arrhythmia is a heart disease that occurs due to a disturbance in the heartbeat that causes the heart rhythm to become irregular. In some cases, arrhythmias can be life-threatening if not detected immediately. The method used to detect is electrocardiogram (ECG) signal analysis. To avoid misdiagnosis by cardiologists and to ease the workload, methods are proposed to detect and classify arrhythmias by utilizing Artificial Intelligence (AI). In recent years, there has been a lot of research on the detection of this disease. However, many of such studies are more likely to use machine learning algorithms in the classification process, and most of the accuracy results still do not reach optimal levels in general. Therefore, this study aims to classify arrhythmias using deep learning algorithms. There are several stages of performing arrhythmia detection, namely, preprocessing, feature extraction, and classification. The focus of this research is only on the classification stage, where the Long Short-Term Memory (LSTM) algorithm is proposed. After going through a series of experiments, the performance of the proposed algorithm is further analyzed to compare accuracy, specificity, and sensitivity with other machine learning algorithms based on previous research, with the aim of obtaining an optimal algorithm for arrhythmia detection. Based on the results of the study, the Long Short-Term Memory (LSTM) algorithm managed to outperform the performance of other machine learning algorithms with accuracy, specificity, and sensitivity results of 98.47%, 99.24%, and 97.67%, respectively.