Abstract Study question To determine whether the association between ovarian reserve and spontaneous miscarriage risk is bidirectional and caused by shared genetic risk loci. Summary answer Bidirectional association between ovarian reserve and spontaneous miscarriage was observed. This may be attributed to five shared risk genes (SYCP2L, TP63, GSPT1, RIF1, and PRRC2A). What is known already Previous studies have shown that women with lower serum anti-Müllerian hormone (AMH) had an increased risk of embryo aneuploidy or spontaneous miscarriage risk, compared to women with higher AMH concentration, although not all studies agree. The most recent meta-analysis postulated that the association between diminished ovarian reserve (DOR) and miscarriage may be not causal, but that the two occurrences merely share a common cause, such as other systematic clinical conditions or past exposure. Inspired by this hypothesis, we conducted the present analyses to clarify this bidirectional association between DOR and miscarriage and further elucidate plausible mechanisms by using genetic data. Study design, size, duration There were four data sources. 1) The Clinical IVF data were retrospectively collected from an academically affiliated Reproductive Medicine Center (17,786 cycles included). 2) We further analyzed data from the UK Biobank (UKB) which is a large-scale, population-based, prospective cohort study (35,316 white women included). 3) The GWAS summary statistics for age at natural menopause (ANM) and spontaneous miscarriage were obtained from published GWAS studies. 4) The individual-level genotype data were also extracted from UKB. Participants/materials, setting, methods There were four analysis modules, 1) IVF data to test the association of ovarian reserve and miscarriage risk by using logistic regression models, 2) UKB data to test the association of spontaneous miscarriage history and ANM by using linear regression models, 3) GWAS summary data to test the overall genetic enrichment between miscarriage and ANM by plotting Q-Q plot, and 4) individual-level genotype data to identify specific shared genes by using ‘pleio’ R package. Main results and the role of chance In the analysis of clinical data, the risk of miscarriage was 1.5 (95% CI: 1.22-1.85, p < 0.001) times in the group with AMH<1.1 ng/ml, compared to the group with AMH > =1.1 ng/ml after adjustment. In the analysis of UK Biobank data, one more spontaneous miscarriage history would lead to 0.02 (95% CI: 0.00-0.03, p = 0.032) years earlier in the standardized ANM after adjustment. Participants with > =2 spontaneous miscarriage history would have 0.05 (95% CI:0.01-0.08, p = 0.011) years earlier in standardized ANM, compared with participants with < =1 spontaneous miscarriage. In the analysis of GWAS summary statistics, we found that there were 11,736,532 single nucleotide polymorphisms (SNPs) tested by both GWAS studies of ANM and miscarriage. In the stratified conditional Q-Q plot, successive leftward deflections did not show which suggested that an overall genetic overlap between miscarriage and ANM was not observed. In the analysis of the individual-level genotype data, we identified five shared genetic risk loci that affect both miscarriage and menopause. They were all novel risk genes for spontaneous miscarriage. Of these five genes, SYCP2L, TP63, GSPT1, and RIF1 were associated with congenital malformations and PRRC2A was associated with autoimmune disease, which are factors that possibly play a role in the occurrence of miscarriage. Limitations, reasons for caution The UKB epidemiology data and genetic data were restricted to participants of European ancestry. Further studies are needed in non-white populations. Second, the predictive value of GWAS summary data for miscarriage may be limited which results in a null finding in the conditional Q-Q plot. Wider implications of the findings Our findings could be of interest to IVF clinicians in patient counseling regarding the prognosis of IVF treatment and genetic counseling for miscarriage. Our findings encourage further research focus on the shared genetic architecture and common pathophysiological basis of diminished ovarian reserve and miscarriage which may bring new therapeutic opportunities. Trial registration number not applicable