Severe arrhythmia can threaten human life, therefore, the timely detection of arrhythmia is important. In this paper, a clustering method of arrhythmia based on PCA-KNN is proposed. Firstly, P-QRS-T waves are extracted. Then the principal component analysis (PCA) algorithm is used to reduce the dimension of high-dimensional heartbeat. Finally, k-nearest neighbor (KNN) method of recognition arrhythmia. Experiments on MIT-BIH arrhythmia database show that compared with most of the most advanced arrhythmia recognition methods, the accuracy of this clustering model is as high as 98.99%.