ABSTRACT: Osteoporosis is a degenerative disease that endangers human health. At present, chemical drugs used for osteoporosis have serious side effects. Therefore, it is valuable to search herbs with high safety and good curative effect in antiosteoporosis. Erzhi formula (EZF), an ancient classic compound, has been reported to have a beneficial effect in antiosteoporosis, but its mechanism is unclear. In this paper, the active compounds of EZF were found in Systems Pharmacology Database, and gene targets related to osteoporosis were obtained in GeneCards. The GO functional and KEGG pathway enrichment analysis were performed by Metascape. The network of "components-targets-signal pathway" was constructed by Cytoscape. Next, molecular docking between the active components and hub genes related to the PI3K-Akt signaling pathway was conducted by Autodock. In the verification experiment, the zebrafish induced by prednisolone (PNSL) was used to reproduce glucocorticoid-induced osteoporosis (GIOP) model, and then the reversal effects of EZF were systematically evaluated according to the behavior, skull staining area, bone mineralization area (BMA), average optical density (AOD), and cumulative optical density (COD). Finally, it was shown that 24 components in EZF could regulate 39 common gene targets to exert antiosteoporosis effect. Besides, the main regulatory mechanisms of EZF were 4 signaling pathways: PI3K-Akt, JAK-STAT, AGE-RAGE, and cancer pathway. In PI3K-Akt signaling pathway, wedelolactone, dimethyl wedelolactone, specnuezhenide, ursolic acid, acacetin, beta-sitosterol, apigenin, and kaempferol can bind tightly with EGF, IL-2, and IL-4 genes. Compared with the model group, the moving distance, swimming speed, and cumulative swimming time of zebrafish in EZF group were significantly increased (P < 0.05). Meanwhile, the BMA and COD of zebrafish were significantly improved after the intervention of EZF (P < 0.05). In summary, the 24 components of EZF exert their antiosteoporosis effects by regulating 39 related gene targets, among which the PI3K signaling pathway is crucial. EZF can promote bone formation and reversed GIOP through "multicomponent/multitarget/multipathway" and the medium dose of EZF may be the most suitable concentration for the treatment of GIOP in zebrafish model.