UNLABELLED: Bai-Shao (BS) ingredients capable of crossing the blood-brain barrier (BBB) were identified and analyzed for their main gene targets. Genes associated with epileptic seizures (ES), cognitive impairment (CI), and inflammation were retrieved, with common targets between BS and these conditions determined via Venn analysis. Protein-protein interaction (PPI) analysis identified the top 10 key genes, whose correlations with apolipoprotein E (APOE) and methylenetetrahydrofolate reductase (MTHFR) were assessed. Functional pathways were explored using Gene Ontology (GO) and the Kyoto Encyclopedia of Genes and Genomes (KEGG), while molecular docking evaluated interactions between BS compounds and target proteins. Findings were validated in a pentylenetetrazol (PTZ)-induced mouse model. BS contains β-sitosterol and betulinic acid, both BBB-permeable, with 277 shared ES/CI-related targets identified. The top 10 genes correlated with APOE and MTHFR, and pathway analysis highlighted interleukin-17 (IL-17) and tumor necrosis factor (TNF) signaling, involving FOS proto-oncogene (FOS), jun proto-oncogene (JUN), caspase-3 (CASP3), phosphoinositide 3-kinase (PI3K), protein kinase B (AKT), and cyclooxygenase-2 (COX2). Behavioral tests, including the Open Field Test and Morris Water Maze, indicated cognitive and motor improvements in PTZ-treated mice. Molecular analysis revealed hippocampal regulation of key genes and altered TNF-alpha (TNFα), interleukin-6 (IL-6), and interleukin-1 beta (IL-1β) levels. In conclusion, BS demonstrates therapeutic potential for comorbid ES and CI by modulating inflammatory pathways and cell survival mechanisms, supporting its role in neurological research. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1007/s13205-025-04316-3.