This research fused on using secondary data in conjunction with longitudinal design and hierarchical linear modeling as a new tendency of human research. First, the importance of longitudinal design was also described. Secondary, we discussed how to apply HLM in the longitudinal design. This study also provided an empirical example by analyzing a secondary data from TEPS. The findings showed that age of junior high school students was negatively related to the condition of mental health which was also impacted by individual characteristics. In the seventh grade, the mental health of male students was better than that of female students; however, gender and living areas had ho effect on the deterioration rate of student's mental health. Moreover, students who had higher mathematics ability had worse mental health. Thus, learning mathematics might bring some stress to junior high school students. Based on the results, we provided some suggestions to improve the mental health of junior high school students and apply HLM with using secondary data and longitudinal design.