Glucocorticoids (GCs) are potent immune‐modulating drugs with significant side effects, including glucocorticoid‐induced osteoporosis (GIO). GCs directly induce osteoblast and osteocyte apoptosis but also alter intestinal microbiota composition. Although the gut microbiota is known to contribute to the regulation of bone density, its role in GIO has never been examined. To test this, male C57/Bl6J mice were treated for 8 weeks with GC (prednisolone, GC‐Tx) in the presence or absence of broad‐spectrum antibiotic treatment (ABX) to deplete the microbiota. Long‐term ABX prevented GC‐Tx‐induced trabecular bone loss, showing the requirement of gut microbiota for GIO. Treatment of GC‐Tx mice with a probiotic (Lactobacillus reuteri [LR]) prevented trabecular bone loss. Microbiota analyses indicated that GC‐Tx changed the abundance of Verrucomicobiales and Bacteriodales phyla and random forest analyses indicated significant differences in abundance of Porphyromonadaceae and Clostridiales operational taxonomic units (OTUs) between groups. Furthermore, transplantation of GC‐Tx mouse fecal material into recipient naïve, untreated WT mice caused bone loss, supporting a functional role for microbiota in GIO. We also report that GC caused intestinal barrier breaks, as evidenced by increased serum endotoxin level (2.4‐fold), that were prevented by LR and ABX treatments. Enhancement of barrier function with a mucus supplement prevented both GC‐Tx–induced barrier leakage and trabecular GIO. In bone, treatment with ABX, LR or a mucus supplement reduced GC‐Tx–induced osteoblast and osteocyte apoptosis. GC‐Tx suppression of Wnt10b in bone was restored by the LR and high‐molecular‐weight polymer (MDY) treatments as well as microbiota depletion. Finally, we identified that bone‐specific Wnt10b overexpression prevented GIO. Taken together, our data highlight the previously unappreciated involvement of the gut microbiota and intestinal barrier function in trabecular GIO pathogenesis (including Wnt10b suppression and osteoblast and osteocyte apoptosis) and identify the gut as a novel therapeutic target for preventing GIO. © 2019 American Society for Bone and Mineral Research.