Background: Youguiyin (YGY) has been confirmed to treat osteoporosis (OP) in clinical trials, but its specific pharmacological mechanism remains unclear. This study aimed to explore the material basis and potential mechanism of YGY in the treatment of OP based on network pharmacology and molecular docking.Methods: Databases including TCMSP, SwissTargetPrediction database, OMIM, and TTD were used to predict the effective ingredients and relevant targets of YGY in the treatment of OP. The STRING database was used to reveal the relationship between each intersection target protein. Metascape database was used to perform GO enrichment analysis and KEGG pathway enrichment analysis on the intersection targets. Cytoscape 3.6.0 software was used to show the complex network relationship of YGY in the treatment of OP. According to the results of network characteristics analysis, the core effective ingredients and the core targets were screened out. Autodock 4.0 was used for molecular docking and Pymol was used to visualize the docking results.Results: 290 effective ingredients, 1127 targets of the effective ingredients, 273 relevant targets of OP and 17 intersection targets were screened out in total by searching literature and databases. Intersection targets could affect biological processes including regulation of inflammatory response, ossification, negative regulation of post-transcriptional gene silencing, positive regulation of cytokine biosynthetic process and regulation of hormone levels by regulating signal pathways including TNF signaling pathway, osteoclast differentiation, apoptosis, MAPK signaling pathway and PI3K/Akt signaling pathway. Through screening, 14 core effective ingredients and 6 core targets were confirmed. The results of molecular docking showed that most of the core effective ingredients including α-humulene, cinnamaldehyde, denudatine, benzoylhypaconine and quercetin had good binding activity with the core targets including TNF-α, IL-1β and IL-6.Conclusion: Based on network pharmacology and molecular docking, the critical effective ingredients, key targets, important signal pathways and main biological processes of YGY in the treatment of OP were successfully screened out. This study revealed the material basis and the mechanism of YGY in the treatment of OP and provided a theoretical basis for follow-up experimental research and clinical application of YGY.