ImportanceDuring menopause, the levels of estrogen and progesterone decrease and 60% to 70% of women experience menopausal symptoms, including mood disturbances. The latter might be prevented by hormone therapy (HT), yet some studies have suggested that use of HT might be associated with increased risk of depression.ObjectiveTo examine whether use of HT during menopause was associated with a subsequent diagnosis of depression.Design, Setting, and ParticipantsThis nationwide register–based cohort and self-controlled case series study included all women in Denmark aged 45 years between January 1, 1995, through December 31, 2017 (n = 825 238), without prior oophorectomy, breast cancer, or cancer in reproductive organs. Follow-up was completed on December 31, 2018. The statistical analysis was performed from September 1, 2021, through May 31, 2022.ExposuresRedeemed prescriptions of different types of HT identified by the Anatomical Therapeutic Chemical classification system codes (G03C [estrogen] and G03F [estrogen combined with progestin]) in the Danish National Prescription Registry between 1995 and 2017. Type of administration was divided into systemic (oral or transdermal) and local (intravaginal or intrauterine).Main Outcomes and MeasuresA hospital diagnosis of depression (International Statistical Classification of Diseases and Related Health Problems, Tenth Revision, codes F32-F33 and International Classification of Diseases, Eighth Revision, codes 296.09, 296.29, 298.0, and 300.49) between 1995 through 2018. Associations were examined in cohort and self-controlled case series analysis using Cox proportional hazards and fixed-effects Poisson regression models.ResultsDuring follow-up from 45 years of age to a mean of 56.0 (range, 45.1-67.7) years, 189 821 women (23.0%) initiated systemically or locally administered HT and 13 069 (1.6%) were diagnosed with depression. Systemically administered HT was mainly initiated before 50 years of age and was associated with a higher risk of a subsequent depression diagnosis (hazard ratio [HR] for 48-50 years of age, 1.50 [95% CI, 1.24-1.81]). The risk was especially elevated the year after initiation of both treatment with estrogen alone (HR, 2.03 [95% CI, 1.21-3.41]) and estrogen combined with progestin (HR, 2.01 [95% CI,1.26-3.21]). Locally administered HT was initiated across all ages and was not associated with depression risk (HR, 1.15 [95% CI, 0.70-1.87]). It was, however, associated with a lower risk of depression when initiated after 54 years of age (HR for 54-60 years of age, 0.80 [95% CI, 0.70-0.91]). In self-controlled analysis, which efficiently accounts for time-invariant confounding, users of systemically administered HT had higher rates of depression in the years after initiation compared with the years before treatment (incidence rate ratio for 0-1 year after initiation, 1.66 [95% CI, 1.30-2.14]).Conclusions and RelevanceThese findings suggest that systemically administered HT before and during menopause is associated with higher risk of depression, especially in the years immediately after initiation, whereas locally administered HT is associated with lower risk of depression for women 54 years or older.