• Xuling Jiangu Formula significantly increased bone mineral density in ovariectomized osteoporotic rats.
• The formula modulated the Treg/Th17 balance by increasing Treg numbers and decreasing Th17-related cytokine secretion.
• It upregulated forkhead box P3 and downregulated retinoic acid-related orphan receptor γt, altering the OPG/RANKL ratio.
• The immunomodulatory effects of Xuling Jiangu Formula contribute to its anti-osteoporotic activity.