As the saying goes, "Teachers impart knowledge to students, and more importantly, teach students how to be human". Setting an example is the best way of moral education. Students, especially primary and secondary school students, are curious and have strong imitation ability. They have special trust and admiration for their teachers. Everything the teacher says and does has a great influence on them. Therefore, teachers' moral cultivation is extremely important in the process of education and teaching. In order to improve students' moral quality, teachers must set an example. Confucius said: to be upright, don't act without orders; His body is not straight, although he disobeys. Educate students, teachers should do what they are asked to do, and teachers should not do what they are asked not to do. If a teacher's teaching ideas are incorrect, he can't be a teacher and set an example. Although he is knowledgeable, his educational effect is not necessarily good. Therefore, in the teaching process, our teachers are required to "be good teachers for students, not policemen". Tao Xingzhi, a famous educator, has a famous saying: "When you come, you have a heart, and when you go, you have no grass." Teachers should always remember to profoundly influence the growth of students with their own words and deeds, and have the prestige and charm of being a human being to make students admire them. Teachers should also actively influence and educate students with their best ideological realm, mental state and behavior, so that they can grow up healthily.