The relationship between students’ psychological changes and athletic performance in physical education has an important impact on teaching quality. Traditional research methods are difficult to accurately portray this complex nonlinear relationship. In this study, a Bayesian network model was constructed based on the improved MMHC algorithm to analyze the association between students’ psychological changes and sports performance in physical education. A stratified whole group sampling method was used to collect data from 2,480 students from 32 high schools in 16 cities in Shandong Province, using the Canadian Assessment of Physical Literacy Questionnaire (CAPL-2) and the Symptom Self-Rating Scale (ACL-90). The traditional Bayesian network was optimized by the event extraction algorithm with the improved MMHC algorithm to establish a network topology containing 17 measures. The results showed that the model prediction accuracy reached 90.37%, and the number of days of participation in moderate- and high-intensity activities in a week had the greatest impact on the mental health level, with a decrease of 9%. Sensitivity analysis showed that four factors, including the definition of health, safe behavior in performing physical activity, the correct way to improve motor function, and the time required to perform physical activity daily, were the sensitivity factors. The study reveals the causal chain of motivation and confidence → knowledge and understanding → daily behavior → mental health level, which provides theoretical support for the reform of physical education.