Background: The classic prescription Chaihu Shugan Powder (CHSGP) has been widely used in clinical Chinese medicine treatment and has clear clinical effects in the treatment of emotional diseases. Based on the increasing incidence of emotional diseases such as insomnia and depression in the population during the COVID-19 pandemic, we will explore the mechanism of CHSGP in the treatment of insomnia and depression with “Same Treatment for Different Diseases”. Methods: Using a bioinformatics and network pharmacology platform, protein database and STRING database, we collected CHSGP chemical composition and related target data and constructed a "component-target" action network through Gene Ontology and Kyoto Encyclopedia of Genes and Genome pathway enrichment analysis. Molecular docking technology was used to verify key active ingredients and core targets. Results: A total of 119 active compounds of CHSGP were screened, such as quercetin, kaempferol, and β-sitosterol, and 113 common related targets overlapped with insomnia and depression. GO enrichment and KEGG pathway analysis mainly involved immune, inflammation, cell proliferation, apoptosis, endocrine and other related targets and signaling pathways. Molecular docking showed that small molecular compounds (kaempferol, luteolin, quercetin, 7-methoxy-2-methyl isoflavone and beta-sitosterol) had good binding effects with five target proteins (AKT1, IL1B, IL-6, FOS, GSK3B) to play a role in regulating immunity, the inflammatory response, cell proliferation, apoptosis, and endocrine signaling. Conclusions: Under the context of the COVID-19 pandemic, it revealed the complex mechanism of multicomponent, multitarget, and multipathway of the classic CHSGP for insomnia and depression, laying a theoretical foundation for its clinical application of its "same treatment for different diseases".