It remains inconclusive whether postpartum depression (PPD) and depression with onset outside the postpartum period (MDD) are genetically distinct disorders. We aimed to investigate whether polygenic risk scores (PGSs) for major mental disorders differ between PPD cases and MDD cases in a nested case-control study of 50,057 women born from 1981 to 1997 in the iPSYCH2015 sample in Demark. We identified 333 women with first-onset postpartum depression (PPD group), who were matched with 993 women with first-onset depression diagnosed outside of postpartum (MDD group), and 999 female population controls. Data on genetics and depressive disorders were retrieved from neonatal biobanks and the Psychiatric Central Research Register. PGSs were calculated from both individual-level genetic data and meta-analysis summary statistics from the Psychiatric Genomics Consortium. Conditional logistic regression was used to calculate the odds ratio (OR), accounting for the selection-related reproductive behavior. After adjustment for covariates, higher PGSs for severe mental disorders were associated with increased ORs of both PPD and MDD. Compared with MDD cases, MDD PGS and attention-deficit/hyperactivity disorder PGS were marginally but not statistically higher for PPD cases, with the OR of PPD versus MDD being 1.12 (95% CI: 0 .97-1.29) and 1.11 (0.97-1.27) per-standard deviation increase, respectively. The ORs of PPD versus MDD did not statistically differ by PGSs of bipolar disorder, schizophrenia, or autism spectrum disorder. Our findings suggest that relying on PGS data, there was no clear evidence of distinct genetic make-up of women with depression occurring during or outside postpartum, after taking the selection-related reproductive behavior into account.