The electrocardiogram reflects the temporal changes in the body’s cardiac potential; This is also an important technology for diagnosing cardiovascular disease, so the classification of electrocardiogram has gradually become the focus of many scholars. This paper designs an ECG classification algorithm based on convolutional neural network, which aims to automatically classify ECG using artificial intelligence algorithm. The algorithm has the characteristics of less parameters and more layers, and the classification speed is faster and has very strong real-time performance. The experimental results show that the accuracy of the algorithm reaches 98.1