Socio-economic development has prompted an increasing number of left-behind children, and the current problem of left-behind children has become a major issue affecting the development of social education and social and livelihood services. Relevant surveys have found that most left-behind children have certain mental health problems, especially various bad behavioral habits, which seriously affect their healthy development. Music education is a form of art education, which has the effect of purifying the mind, cultivating sentiment, cultivating temperament and releasing stress. In this regard, schools need to actively carry out music education activities and grasp the influence of music education on various aspects of mental health and bad behavioral habits of left-behind children. In this way, schools should make targeted educational plans and scientifically carry out various music and art activities. This paper focuses on the influence of music education on the mental health and bad behavioral habits of urban left-behind children.