BackgroundObservational studies have revealed a link between major depressive disorder (MDD) and a higher chance of developing atrial fibrillation (AF). It is still uncertain whether or not this correlation indicates a causal relationship. This research set out to evaluate the causal impact of MDD on AF.MethodsTo evaluate the causal relationship between MDD and AF, we employed a two-sample Mendelian randomization (MR) method. A new genome-wide association study (GWAS) with 500,199 participants was used to obtain an overview of the association of genetic variations with MDD. An additional GWAS incorporating 1,030,836 people provided data on the relationship between gene variants and AF. The inverse-variance weighted technique was utilized to assess the effect sizes. Sensitivity analysis included the use of other statistical approaches such as weighted median, Outlier, MR Pleiotropy Residual Sum, weighted mode, simple mode, and MR - Egger.ResultsBy employing 47 single nucleotide polymorphisms (SNPs) as markers, MR analyses in random-effect inverse-variance weighted models found that genetically projected MDD was linked to an elevated incidence of AF (odds ratio [OR] = 1.098, 95% CI 1.000–1.206; P = 0.049). No gene pleiotropy was discovered as indicated by MR-Egger (intercept= -0.011,P= 0.169). Sensitivity analysis employing other MR techniques yielded reliable results.ConclusionThis MR study established a causal relationship between genetically predicted MDD and an elevated risk of AF.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12920-023-01565-0.