Prior studies have revealed an increased susceptibility to epilepsy in hyperthyroid individuals, but the genetic basis of the hyperthyroidism–epilepsy relationship is not fully comprehended, prompting this study to explore this potential association. We conducted a two-sample Mendelian randomization (TSMR) study to explore the relationship between hyperthyroidism and epilepsy by utilizing aggregated statistics from Genome-Wide Association Studies (GWAS). Data for hyperthyroidism were derived from a GWAS encompassing 462,933 participants, while epilepsy data were sourced from the International League Against Epilepsy (ILAE) consortium. Five distinct methods were employed for TSMR analysis, which included the inverse variance weighting method, MR Egger method, weighted median method, simple model, and weighted model. In our sensitivity analysis, we employed the MR Egger and MR PRESSO methods to assess pleiotropy, and inverse variance weighting and MR Egger in Cochran’s Q statistics to assess heterogeneity. In the IEU database, utilizing the MR-Egger method, we obtained an odds ratio (OR) of 2.631 (95% CI 0.608, 9.796) with a p-value of 0.122. Meanwhile, employing the Weighted Median method yielded an OR of 1.813 (95% CI 0.786, 4.181) with a p-value of 0.163. The IVW method exhibited an OR of 1.986 (95% CI 1.127, 3.502) with a p-value of 0.018. In the assessment of heterogeneity, the MR-Egger method produced a Q statistic of 65.205, accompanied by a p-value of 0.087, while the IVW method recorded a Q statistic of 66.668 with a p-value of 0.083. The multifactorial analysis results showed an intercept term with a standard error (SE) value of 0.009 and a p-value of 0.291. In the FinnGen database, employing the MR-Egger method for all epilepsy data, we observed an OR of 0.952 (95% CI 0.831, 1.093) with a p-value of 0.539. Simultaneously, the Weighted Median method produced an OR of 0.986 (95% CI 0.953, 1.021) with a p-value of 0.423. The IVW method indicated an OR of 0.992 (95% CI 0.965, 1.019) with a p-value of 0.541. The MR-Egger method’s assessment of heterogeneity resulted in a Q statistic of 2.671, associated with a p-value of 0.445, while the IVW method generated a Q statistic of 3.011 with a p-value of 0.556. The multifactorial analysis results displayed an intercept term with a SE-value of 0.019 and a p-value of 0.601. Sensitivity analysis found no evidence of horizontal pleiotropy or heterogeneity. Hyperthyroidism was found to be causally related to all epilepsy but had no effect on other types of epilepsy.