Electrocardiograms (ECG) analysis is one of the most important ways to diagnose heart disease. This paper proposes an efficient ECG classification method based on Wasserstein scalar curvature to comprehend the connection between heart disease and the mathematical characteristics of ECG. The newly proposed method converts an ECG into a point cloud on the family of Gaussian distribution, where the pathological characteristics of ECG will be extracted by the Wasserstein geometric structure of the statistical manifold. Technically, this paper defines the histogram dispersion of Wasserstein scalar curvature, which can accurately describe the divergence between different heart diseases. By combining medical experience with mathematical ideas from geometry and data science, this paper provides a feasible algorithm for the new method, and the theoretical analysis of the algorithm is carried out. Digital experiments on the classical database with large samples show the new algorithm’s accuracy and efficiency when dealing with the classification of heart disease.