Background. With the continuous advancement of clinical application and experimental research of JTP, the application prospect of JTP in nervous system diseases and metabolic diseases is becoming increasingly clear. Jiaotai Pill (JTP) is a traditional Chinese medicine formula for insomnia, consisting of Coptidis rhizoma and Cinnamomi cortex, which dates back to Han Shi Yi Tong in the Ming Dynasty of China. Objective. Based on the brain-gut axis theory, this paper aims to explore the potential mechanism of JTP in the intervention of insomnia by using intestinal microbiome and metabolomics technology, taking the animal model of insomnia as the research object, so as to provide experimental basis for its further application and research. Methods. The insomnia mouse model was induced by intraperitoneal injection of para-chlorophenylalanine (PCPA). The clinical equivalent dose of JTP was administered by gavage for one week. The efficacy of JTP was evaluated by behavioral tests, serum biochemical detection, and brain histomorphological observation. The contents of cecum were analyzed by microbiomics and metabolomics. Results. The results show that insomnia caused by PCPA led to daytime dysfunction, higher HPA axis hormone levels, and morphologically impaired hippocampus. JTP reversed these anomalies. Omics research indicates that JTP significantly reduced gut α diversity; at the phylum level, JTP reduced the relative abundance of Firmicutes, Deferribacterota, Cyanobacteria, and Actinobacteriota and increased the relative abundance of Verrucomicrobiota, Proteobacteria, and Desulfobacterota. At the genus level, JTP reduced the relative abundance of Muribaculaceae, Lachnospiraceae_NK4A136_group, Alistipes, Colidextribacter, Muribaculum, and Mucispirillum and increased the relative abundance of Bacteroides and Akkermansia. JTP also reversed the activation of the linoleic acid metabolism pathway induced by insomnia. The combined analysis of omics suggests that JTP may play a role by regulating the inflammatory state of the body. Further gene expression analysis of brain tissue confirmed this. Conclusions. We hypothesize that JTP may achieve insomnia relief by eliminating inflammation-causing bacteria in the gut and reducing inflammation levels through the brain-gut axis, pointing to potential targets and pathways for future research on JTP.