The aim of this study is to explore the relationship between exercise motivation and eating disorder and the mediating effect of anxiety in physical exercise. Athletes are in a social network, and the different human-machine relationships and situations generated in this may produce different sports motivations and anxiety states for athletes. The exercise motivation, status-trait anxiety, and eating disorder of 1076 fitness subjects were described and analyzed by questionnaire survey, and the survey data were statistically analyzed by means of correlation, regression, and structural equation model. The results showed that the overall detection rate of eating disorder was 56.3%. The overall detection rate of eating disorder was different between males and females. Exercise motivation has a significant positive correlation with state anxiety and eating disorder. Exercise motivation has a significant positive predictive effect on eating disorder, exercise motivation has a significant positive predictive effect on state anxiety, and state anxiety has a significant positive predictive effect on eating disorder. The mediating effect shows that state anxiety can partially mediate the relationship between exercise motivation and eating disorder, exercise motivation has a direct impact on eating disorder, and state anxiety has an indirect impact on eating disorder. In physical exercise, the exercisers’ bad exercise motivation will produce too much anxiety. Poor exercise motivation and anxiety can lead to symptoms of eating disorders. In physical exercise, we should adopt reasonable value orientation and positive psychological suggestion and encourage healthy and reasonable eating behavior, which will help to prevent and treat eating disorders.