Detection and classification of malignant arrhythmia are key tasks of automated external defibrillators. In this paper, 21 metrics extracted from existing algorithms were studied by retrospective analysis. Based on these metrics, a back propagation neural network optimized by genetic algorithm was constructed. A total of 1,343 electrocardiogram samples were included in the analysis. The results of the experiments indicated that this network had a good performance in classification of sinus rhythm, ventricular fibrillation, ventricular tachycardia and asystole. The balanced accuracy on test dataset reached up to 99.06%. It illustrates that our proposed detection algorithm is obviously superior to existing algorithms. The application of the algorithm in the automated external defibrillators will further improve the reliability of rhythm analysis before defibrillation and ultimately improve the survival rate of cardiac arrest.