Objective:To explore the active components and mechanism of Jiaotai Pill (JTP) in the treatment of primary insomnia (PI) based on gene expression omnibus.Methods:The main active components of Jiaotai Pills were obtained by TCMSP and literature mining, and the targets of the active components of Jiaotai Pills were predicted. The targets were verified and standardized by Uniprot database. PI-related targets were obtained from GeneCards, OMIM, DrugBank, PharmGKB, and TTD databases. Obtaining an intersection action target point of the Jiaotai pill and the PI by using a Venny diagram; Gene chip data (GSE208668) was downloaded from gene expression omnibus database, and then gene probe enrichment analysis (GSEA) was used to screen the differentially expressed genes between PI patients and normal controls, and molecular docking was used to virtually verify the screened differentially expressed genes with potential active compounds.Results:21 active components and 263 potential targets of Jiaotai Pill were screened by database analysis and literature mining, 112 of which were intersected with PI. Molecular docking results showed that quercetin, EGCG, kaempferol, R-kanatin, stigmasterol, berberine and other core active components had good docking activity with related differential genes.Conclusion:Jiaotai Pill can regulate the release of inflammatory factors through multiple active ingredients, multiple disease targets, multiple biological pathways and multiple pathways to achieve the purpose of treating PI, which provides a theoretical basis for the clinical treatment of PI and broadens the clinical use of Jiaotai Pill.