We investigated the beneficial effects and underlying mechanisms of Zhuanggu Guanjie (ZGGJ) pill in osteoporosis in vitro and in vivo. Bone marrow macrophages from 4-6-week-old mice were cultured in the presence of macrophage colony-stimulating factor (15 ng/mL) and receptor activator of nuclear factor-κB ligand (30 ng/mL). Osteoclast differentiation was determined by quantification of tartrate-resistant acid phosphatase activity. Gelatin zymography was used to detect the activity of matrix metalloproteinases in osteoclasts. Ovariectomized rats were administered orally with estradiol valerate or ZGGJ for 8 weeks. Blood was collected to measure serum indices. Tibiae were harvested to carry out bone microcomputed tomography scanning, histomorphological analysis, and bone strength determination. ZGGJ inhibited tartrate-resistant acid phosphatase activity, matrix metalloproteinase 9 expression, and bone resorption in vitro. At doses of 0.55, 1.1, and 2.2 g/kg, ZGGJ exerted significant osteoprotective effects including inhibition of bone turnover markers and improved tibia bone strength in ovariectomized rats. Microcomputed tomographic analysis showed that ZGGJ improved the trabecular architecture with increased connectivity density and trabecular thickness and decreased trabecular spacing. These results revealed that ZGGJ prevents bone loss induced by ovariectomy in rats and that inhibition of bone resorption is involved in the bone-protective effects of ZGGJ.