Although gut microbiota influences osteoporosis risk, the individual species involved, and underlying mechanisms, are unknown. We performed integrative analyses in a Chinese cohort with metagenomics/targeted metabolomics/whole-genome sequencing. Bacteroides vulgatus was found negatively associated with bone mineral density (BMD), this association was validated in US Caucasians. Serum valeric acid was positively associated with BMD, and B.vulgatus causally downregulated it. Ovariectomized mice fed B.vulgatus had decreased bone formation and increased bone resorption, lower BMD and poorer bone micro-structure. Valeric acid suppressed NF-κB p65 protein production (pro-inflammatory), and enhanced IL-10 mRNA expression (anti-inflammatory), leading to suppressed maturation of osteoclast-like cells, and enhanced maturation of osteoblasts in vitro. B.vulgatus and valeric acid represent promising targets for osteoporosis prevention/treatment.