Adolescence is the critical period of the formation for individual personality traits, which would be influenced by numerous factors such as the internal and external environment. In view of physical exercise as an important factor affecting the healthy development of adolescents, whether it would play an important role in the formation of adolescents’ personality traits and how it would work deserve further investigation. Based on the Ecological Systems Theory, this study has explored the relationship between physical exercise and adolescents’ personality traits, as well as the mediating effect of peer relationship and the moderating effect of parent–child relationship using 9,284 data samples. The regression results show that physical exercise has a significant positive impact on the development of personality traits such as neuroticism, conscientiousness, and agreeableness. Peer relationships exert the mediating effect between physical exercise and adolescents’ personality traits. However, parent–child relationship only moderates the effect of physical exercise on conscientiousness and agreeableness.