Chronic pain (CP) is often accompanied by mental disorders (MDs). However, little is known concerning the long-term effect of MDs, personality traits, and early-life traumatic events (ETEs) on CP course. Accordingly, we aimed to prospectively assess the associations of major depressive disorders (MDDs), anxiety disorders, personality traits, and ETEs with the incidence and the persistence of CP in middle-aged and older community dwellers. Data stemmed from the 3 first follow-up evaluations of CoLaus|PsyCoLaus, a prospective cohort conducted in the general population of Lausanne (Switzerland). Diagnostic criteria for MDs and ETEs were elicited using semistructured interviews. CP and personality traits were assessed by self-rating questionnaires. Follow-up intervals were subdivided into 2 groups: those without (n = 2280) and those with (n = 1841) CP initially. The associations between the psychological variables and the occurrence or persistence of CP 5 years later were assessed using serially adjusted logistic regression models. Higher neuroticism (odds ratio [95% confidence interval] 1.21 [1.08; 1.36]) and extraversion (1.18 [1.06; 1.32]) were associated with higher 5-year CP incidence, whereas current (2.14 [1.34; 3.44]) and remitted MDD (1.29 [1.00; 1.66]) as well as lower extraversion (0.83 [0.74; 0.94]) were associated with persistence of CP. By contrast, ETEs and anxiety disorders were not associated with the incidence or persistence of CP. Our results suggest that personality traits are associated with both CP occurrence and persistence, whereas the MDDs may be more associated with CP persistence. Both personality and MDD are accessible to psychotherapy, and MDD is also accessible to pharmacotherapy. Hence, these therapeutic measures might decrease the risk of CP and its persistence.