Abstract Aims: Epilepsy is a neurological disease occurring worldwide. Alterations in the gut microbial composition may be involved in the development of Epilepsy. The study aimed to investigate the effects of cannabidiol (CBD) on gut microbiota and the metabolic profile of epileptic rats. Materials and methods and results: A temporal lobe epilepsy rat model was established using Li-pilocarpine. CBD increased the incubation period and reduced the epileptic state in rats. Compared to epileptic rats, the M1/M2 ratio of microglia in the CBD group was significantly decreased. The expression of IL-1β, IL-6, and TNF-α in the CBD group decreased, while IL-10, IL-4, and TGF-β1 increased. 16S rDNA...