Although migration trajectories over people's life courses seem to be associated with mental health outcomes, previous studies have considered migration at only one point in time when correlating migration with mental health. However, people can migrate multiple times during their life courses. The decision to migrate can be triggered by several life course development events, such as education, entry to the labour market, marriage, or retirement. The present study addressed this research gap by focusing on the trajectories of migration and their relationship to mental health among internal migrants in China. Data were collected from a cross‐sectional survey (N = 534) in Shenzhen, China, in 2017. People's migration trajectories were aligned into migration groups using sequence alignment method. Binary logistic regression models were estimated to assess the associations between each migration trajectory group and the prevalence of mental health problems, controlling for sociodemographics and self‐reported physical health. The results show that migration trajectories—namely, the sequence of multiple migrations between migrants' places of origin and their final destinations—are significantly related to mental health outcomes. Our findings suggest that treating migration as a one‐time transition could be problematic because many migrants undertake multiple migration trips.