ObjectiveTo explore the functions and potential regulatory mechanisms of chemokine and chemokine receptor (CCR)-related genes in epilepsy.MethodsCCRs were identified as candidate genes and their causal relationship with epilepsy was rigorously evaluated via Mendelian randomization analysis. Subsequently, single-cell RNA sequencing (scRNA-seq) data were analyzed to identify and classify cell clusters into distinct types based on cellular annotation. Differential expression analysis was conducted to pinpoint key genes by overlapping the candidate gene set with differentially expressed genes (DEGs). Furthermore, potential therapeutic drugs for epilepsy were predicted, offering novel avenues for disease management and treatment.ResultsIn total, 6395 DEGs were identified across the six cell clusters. After their intersection, CCRL2, XCL2, CXCR5, CXCL1, and CX3CR1 were pinpointed as key genes. Microglia, T cells, B cells, and macrophages have been emerged as critical cells. Furthermore, CXCL1 was regulated by hsa-miR-570-3p and hsa-miR-532-5p. Notably, CXCR5, CXCL1, and CX3CR1 were associated with 27 drug compounds. This comprehensive study leveraged scRNA-seq and transcriptomic data to elucidate the roles of CCR-related genes in epilepsy. Notably, CCRL2, XCL2, CXCR5, CXCL1,and CX3CR1 were identified as key genes implicated in epilepsy, whereas microglia, T cells, B cells, and macrophages were recognized as critical contributors to the development of epilepsy.ConclusionsRegulating the expression of CCRL2, XCL2, CXCR5, CXCL1, and CX3CR1, along with the activity of these immune cells may offer therapeutic potential for the alleviation of epilepsy.