Previous studies have suggested that gut microbiota (GM) may be involved in the pathogenesis of epilepsy through the microbiota-gut-brain axis (MGBA). However, the causal relationship between GM and different epilepsy subtypes and whether circulating inflammatory proteins act as mediators to participate in epileptogenesis through the MGBA remain unclear. Therefore, it is necessary to identify specific GM associated with epilepsy and its subtypes and explore their underlying inflammatory mechanisms for risk prediction, personalized treatment, and prognostic monitoring of epilepsy. We hypothesized the existence of a pathway GM-inflammatory proteins-epilepsy. We found genetic variants strongly associated with GM, circulating inflammatory proteins, epilepsy and its subtypes, including generalized and partial seizures, from large-scale genome-wide association studies (GWAS) summary data and used Multivariate Mendelian Randomization to explore the causal relationship between the three and whether circulating inflammatory proteins play a mediating role in the pathway from GM to epilepsy, with inverse variance weighted (IVW) method as the primary statistical method, supplemented by four methods: MR-Egger, weighted median estimator (WME), Weighted mode and Simple mode. 16 positive and three negative causal associations were found between the genetic liability of GM and epilepsy and its subtypes. There were nine positive and nine negative causal associations between inflammatory proteins and epilepsy and its subtypes. Furthermore, we found that C-X-C motif chemokine 11 (CXCL11) levels mediated the causal association between Genus Family XIII AD3011 group and epilepsy. Our study highlights the possible causal role of specific GM and specific inflammatory proteins in the development of epilepsy and suggests that circulating inflammatory proteins may mediate epileptogenesis through the MGBA.