The experience of childhood life events is associated with higher vulnerability to develop psychiatric disorders. One of the pathways suggested to lead to this vulnerability is activation of the immune system. The aim of this study is to find out whether the association between childhood life events and the development of mood and anxiety disorders is predicted by the activation of the immune system. This study was performed in TRAILS, a large prospective population cohort, from which a subgroup was selected (N = 1084, 54.3% female, mean age 19.0 (s.d., 0.6)). Childhood life events before age 16 were assessed using questionnaires at age 12, 14, 16 and 19. Immune activation was assessed at age 16 by elevated high-sensitive C-reactive protein (hsCRP) and by levels of immunoglobulin G antibodies against the herpes viruses herpes simplex virus 1, cytomegalovirus and Epstein–Barr virus. At age 19, the presence of mood and anxiety disorders was determined using the World Health Organization Composite International Diagnostic Interview Version 3.0. Regression analyses were used to study the association between life events, the inflammatory markers and mental health. We found that childhood life events score was associated with risk of mood disorders (B = 0.269, Po0.001) and anxiety disorders (B = 0.129, Po0.001). Childhood life events score was marginally associated with elevated hsCRP (B = 0.076, P = 0.006), but not with the antibody levels. This was especially due to separation trauma (P = 0.015) and sexual abuse (P = 0.019). Associations lost significance after correcting for lifestyle factors such as body mass index and substance abuse (P = 0.042). None of the inflammatory markers were associated with development of anxiety disorders or mood disorders. In conclusion, the life event scores predicted the development of anxiety disorders and mood disorders at age 19. Life event scores were associated with elevated hsCRP, which was partly explained by lifestyle factors. Elevated hsCRP was not associated with the development of psychiatric disorders at age 19.