BackgroundContinuous use of glucocorticoids (GCs) has become the primary cause of secondary osteoporosis. Bisphosphonate drugs were given priority over denosumab and teriparatide in the 2017 American College of Rheumatology (ACR) guidelines but have a series of shortcomings. This study aims to explore the efficacy and safety of teriparatide and denosumab compared with those of oral bisphosphonate drugs.MethodsWe systematically searched studies included in the PubMed, Web of Science, Embase, and Cochrane library databases and included randomized controlled trials that compared denosumab or teriparatide with oral bisphosphonates. Risk estimates were pooled using both fixed and random effects models.ResultsWe included 10 studies involving 2923 patients who received GCs for meta-analysis, including two drug base analyses and four sensitivity analyses. Teriparatide and denosumab were superior to bisphosphonates in increasing the bone mineral density (BMD) of the lumbar vertebrae [teriparatide: mean difference [MD] 3.98%, 95% confidence interval [CI] 3.61–4.175%,P= 0.00001; denosumab: MD 2.07%, 95% CI 0.97–3.17%,P= 0.0002]. Teriparatide was superior to bisphosphonates in preventing vertebral fractures and increasing hip BMD [MD 2.39%, 95% CI 1.47–3.32,P< 0.00001]. There was no statistically significant difference between serious adverse events, adverse events, and nonvertebral fracture prevention drugs.ConclusionsTeriparatide and denosumab exhibited similar or even superior characteristics to bisphosphonates in our study, and we believe that they have the potential to become first-line GC-induced osteoporosis treatments, especially for patients who have previously received other anti-osteoporotic drugs with poor efficacy.Supplementary InformationThe online version contains supplementary material available at 10.1186/s13018-023-03920-4.