Introduction: To explore the mechanism of action of appling Radix Ginseng and Semen Ziziphi Spinosae Drug pair (R-S) in the treatment of insomnia by investigating the effect of R-S on GLU/GABA-GLN metabolic cycle and intestinal microflora of rats with insomnia.Methods: Rats were intraperitoneally injected with 4-chloro-DL-phenylalanine (PCPA) to make sleep deprivation (SD) models. The rats were divided into 6 groups, with 8 rats in each group. The general status of the rats was observed and the pentobarbital sodium sleep synergy experiment was performed. The contents of GABA, GLU, GLN, GAD65, and GS in hippocampus of rats were determined by ELISA. The expressions of GABAARα1mRNA, mGluR5mRNA, NR1mRNA and GluR1mRNA in rats’ hippocampal tissue were determined by Realtime PCR. 16SrRNA gene sequencing was used to analyze the intestinal microflora of insomnia rats.Results: In PCPA-induced insomnia rats, the state of insomnia was relieved, the sleep rate was improved, the duration of sleep latency was shortened and the sleep duration was prolonged in each dose group of R-S (p < 0.05, p < 0.01) compared with the model group. The contents of GABA, GLN, GAD65 and GS were increased (p < 0.05, p < 0.01) while GLU content was decreased (p < 0.01) in both medium and high dose groups, especially in the high dose group. The expression of GABAARα1mRNA was increased (p < 0.01), and the expressions of mGluR5mRNA, NR1mRNA and GluR1mRNA were decreased (p < 0.01) in hippocampal tissue of rats in R-S groups, especially in the high dose group. At the same time, the various dose groups of R-S could improve the species diversity, microflora abundance of insomnia rats and regulate the KEGG metabolic pathway related to sleep.Discussion: R-S can improve the sleep of PCPA-induced insomnia rats by regulating GLU/GABA-GLN metabolic cycle and intestinal microflora, which provides experimental basis for appling R-S in the treatment of insomnia.