Objective Migraine and major depressive disorder show a high rate of comorbidity, but little is known about the associations between the subtypes of major depressive disorder and migraine. In this cross-sectional study we aimed at investigating a) the lifetime associations between the atypical, melancholic, combined and unspecified subtype of major depressive disorder and migraine with and without aura and b) the associations between major depressive disorder and its subtypes and the severity of migraine. Methods A total of 446 subjects with migraine (migraine without aura: n = 294; migraine with aura: n = 152) and 2511 controls from the population-based CoLaus/PsyCoLaus study, Switzerland, were included. Associations between major depressive disorder subtypes and migraine characteristics were tested using binary logistic or linear regression. Results Melancholic, combined and unspecified major depressive disorder were associated with increased frequency of migraine with aura, whereas only melancholic major depressive disorder was associated with increased frequency of migraine without aura. Lifetime and unspecified major depressive disorder were associated with severe migraine intensity among subjects with migraine with aura but not migraine without aura, while combined major depressive disorder was associated with higher migraine frequency independently from migraine subtype. Conclusion This study suggests that melancholic but not atypical major depressive disorder is associated with migraine and migraine subtypes. Future studies exploring pathophysiological mechanisms shared between melancholic depression and migraine are warranted.