Background Obesity has a negative impact on bone health; thus far, no specific pharmacotherapy has been approved. Berberine has shown improvements in osteoporosis in some animal models. However, it remains unknown whether berberine ameliorates obesity-induced bone damage. This study aims to evaluate the effect of berberine on bone damage in high-fat diet (HFD)-induced obese rats. Methods Male Sprague-Dawley rats were randomly assigned to a normal control diet (ND) group or HFD group. After the HFD induced obesity, the models were successfully established. Then, these rats were randomly divided into the HFD + berberine (HB) group or HFD group and were intraperitoneally administered berberine or an equivalent volume of DMSO, respectively, once a day for another 10 weeks. Micro-CT and three-point bending tests were conducted to evaluate bone microstructure and biomechanics. Serum was collected for the detection of P1NP, CTX-1, calcium (Ca) and phosphorus (P), tumor necrosis factor-α (TNF-α) and interleukin-1β (IL-1β). HE staining was performed to observe the number of trabecular and bone marrow adipocytes. Results HFD-induced obese rats displayed decreased biomechanical properties, such as maximum load, maximum fracture load, ultimate tensile strength, stiffness, and energy absorption, compared with the ND rats (p<0.05). However, berberine attenuated bone damage, including maximum load, maximum fracture load, and stiffness, in the HB group compared with the HFD group (p<0.05). Trabecular bone markers were decreased in the HFD group compared with the ND group (p<0.05). All parameters were improved, as shown by micro-CT and HE staining, in the HB group compared to the HFD group. Cortical bone markers were not significantly different among all groups. Moreover, CTX-1, TNF-α, IL-1β and the number of adipocytes in bone marrow were significantly increased in HFD-induced obese rats. After treatment with berberine, TNF-α, IL-1β and the number of adipocytes in bone marrow were significantly decreased, and P1NP levels were higher in the HB group than in the HFD group. Conclusions Berberine might be a potential therapeutic agent for treating bone damage in HFD-induced obese rats by inhibiting inflammatory factors, reducing bone marrow adiposity and improving bone formation.