Aiming at the problems of low optimization accuracy, poor optimization effect, and long running time in current teaching optimization algorithms, a multiclass interactive martial arts teaching optimization method based on the Euclidean distance is proposed. Using the K-means algorithm, the initial population is divided into several subgroups based on the Euclidean distance, so as to effectively use the information of the population neighborhood and strengthen the local search ability of the algorithm. Imitating the school's selection of excellent teachers to guide students with poor performance, after the "teaching" stage, the worst individual in each subgroup will learn from the best individual in the population, and the information interaction in the evolutionary process will be enhanced, so that the poor individuals will quickly move closer to the best individuals. According to different learning levels and situations of students, different teaching stages and contents are divided, mainly by grade, supplemented by different types of learning groups in the form of random matching, so as to improve the learning ability of members with weak learning ability in each group, which effectively guarantees the diversity of the population and realizes multiclass interactive martial arts teaching optimization. Experimental results show that the optimization effect of the proposed method is better, which can effectively improve the accuracy of algorithm optimization and shorten the running time of the algorithm.