Arrhythmia is a common cardiovascular disease; the electrocardiogram (ECG) is widely used as an effective tool for detecting arrhythmia. However, real-time arrhythmia detection monitoring is difficult, so this study proposes a long short-term memory-residual model. Individual beats provide morphological features and combined with adjacent segments provide temporal features. Our proposed model captures the time-domain and morphological ECG signal information simultaneously and fuses the two information types. At the same time, the attention block is applied to the network to further strengthen the useful information, capture the hidden information in the ECG signal, and improve the model classification performance. Our model was finally trained and tested on the MIT-BIH arrhythmia database, and the entire dataset was divided into intrapatient and interpatient modes. Accuracies of 99.11% and 85.65%, respectively, were obtained under the two modes. Experimental results demonstrate that our proposed method is an efficient automated detection method.