Clinical trials have shown that cognitive behavioural therapy for insomnia (CBT-I) may have an effect on both insomnia and depression in comorbid samples, but there is a gap in the knowledge on why CBT-I has an impact on depression. Neuropsychological theories suggest that disturbed sleep may work as a transdiagnostic process that maintains psychopathology. The aim was to test whether CBT-I impacts depressive symptoms through improved sleep, in a sample with insomnia comorbid with major depression and subthreshold depressive symptoms. 64 participants were recruited through advertisements and randomised to receive either CBT-I or an active control (relaxation training: RT) in groups during four bi-weekly sessions. Insomnia (ISI) and depressive severity (BDI-II) were measured pre-, mid- and post-treatment. Mediational analyses were conducted. Insomnia and depressive severity lowered over the course of treatments. CBT-I was superior in reducing insomnia. The main treatment outcomes have been published elsewhere (Norell-Clarke et al, 2015). The relationship between CBT-I and post-treatment depressive severity was mediated by mid-treatment insomnia severity, which indicates that the effect of CBT-I on depression goes through improved sleep (b = -4.87, BCa CI = -9.21, -1.97). The results were maintained when pre-treatment insomnia and depressive severity were controlled for (b = -3.36, BCa CI = -8.86, -0.45). Testing for reciprocity, we found that mid-treatment depressive severity did not mediate between CBT-I and post-treatment insomnia severity. The results support the perpetuating role of insomnia in depression. This may have implications for other psychiatric patient groups with comorbid insomnia. Also, the results indicate that CBT for comorbid patient groups may need to target sleep specifically.