Abstract The implementation of teaching quality evaluation has a certain guiding effect on a series of teaching works, such as teaching reform and teaching management, and the selection of appropriate evaluation methods is very important for the implementation of teaching quality evaluation. In this study, the hierarchical analysis method and K-means clustering algorithm were used to construct and assess a teaching quality evaluation model for college Civics education. Prior to evaluating the teaching quality of Civic and political education in colleges and universities, the hierarchical structure model and index system were established using the hierarchical analysis method. Then, the K-means clustering algorithm is utilized to execute the data mining work to assess the quality of data-driven teaching through clustering. The algorithm’s purity and F1 values are 0.895 and 0.834, respectively, and it performs well in clustering. Finally, the clustering analysis of the teaching quality of college civic education was conducted. The final scores of teaching quality, teaching method, teaching content, teaching effect, and teaching characteristics accounted for 98.28%, 87.76%, 88.03%, 71.4%, and 83.2% of the total scores of each, respectively. All the scores are in the middle of the range, indicating that the overall teaching situation is in the middle of the range with better results. The purpose of this study is to provide lessons and references for cluster analysis of civic education teaching quality in colleges and universities.