With various social pressures and the lack of knowledge about physical health, students have poor physical education quality and insufficient knowledge acquisition about physical health. Traditional physical health teaching is a process in which the teacher tells the theory of physical health and students passively accept it, which leads to physical health problems such as low learning efficiency of students’ physical health knowledge and low interest in learning physical health knowledge. With the emphasis on physical health teaching and the development of technologies such as machine learning, machine learning is used to analyze the problems of physical health teaching and help students to learn physical health better to improve the efficiency of physical health teaching. The results of this paper show that the machine learning-based physical education and traditional physical education can reduce the injury rate of students’ sports by 7.7% compared with traditional physical education, make students’ interest in physical education and health learning reach 53.3%, and improve the efficiency of physical education and health learning. There is a degree of students’ acquisition of physical health knowledge. The change from traditional physical health teaching ideology to machine learning-based physical education ideology can improve the teaching efficiency of physical health teaching, allow students to acquire more physical health knowledge, and effectively reduce the risk of students’ injuries in sports.