BackgroundGlucocorticoid-induced osteoporosis (GIOP) is a disease in which long-term use of glucocorticoid causes bone loss, deterioration of bone microstructure and fracture. Currently, clinical drugs targeting this disease have certain side effects. There is still a need to find effective drugs with fewer side effects. The theory of traditional Chinese medicine suggests that YGJ has therapeutic effect on GIOP, but it has not been explained. Therefore, this study aims to explore the protective effect of YGJ on GIOP mouse models and elucidate the underlying mechanism through LC–MS-based metabolomics analysis.MethodsThe general condition of 8 week age male C57BL/6J mice was recorded after 8 weeks of treatment with dexamethasone (DEX) and YGJ. Bone-related parameters and bone morphology were determined by Micro-CT. HE staining was used to observe the pathological changes of bone tissue. Serum levels of bone metabolism markers were detected by ELISA. Liver metabolomics analysis was conducted to search for the significant markers of anti-GIOP of YGJ and the metabolic pathway affecting it.ResultsAfter treatment, YGJ significantly reversed the weight loss caused by DEX; increase the number of bone trabecular in ROI region, significantly improve the bone-related parameters of GIOP mice, and increase the levels of alkaline phosphatase and osteocalcin. In the study of metabolic mechanism, YGJ reversed 24 potential markers in GIOP mice. These included cortisol, 3-hydroxybutyric acid, taurine, esculin and uric acid, which are closely associated with osteoporosis. Topological analysis results showed that YGJ had the most significant effect on taurine and hypotaurine metabolism, with − log10 (P) > 2.0 and Impact > 0.4.ConclusionsYi-Guan-Jian decoction can increase bone density and improve bone microstructure by regulating the levels of alkaline phosphatase and osteocalcin and reverse bone loss in GIOP mouse model. The underlying metabolic mechanism may be related to taurine and hypotaurine metabolic pathway.Supplementary InformationThe online version contains supplementary material available at 10.1186/s13018-023-03778-6.