Schaftoside (SS) is a bioactive compound present in the Herba Desmodii Styracifolii (DS), a herb that has been used to treat cholelithiasis and urolithiasis in Chinese medicine. Whether SS inhibits cholesterol (Ch) gallstone formation has not been investigated. This study examined the effects of oral intake of SS on Ch gallstone formation in C57BL/6 mice fed a lithogenic diet. The rate of gallstone formation was recorded. Levels of Ch, triglycerides (TG) and bile salts (BS) were measured in the bile and serum. Liver histopathology was examined microscopically, and mRNA expression levels of key genes involved in cholesterol and bile metabolism were determined by qPCR. Mice fed SS were protected against gallstone formation, had increased biliary levels of BS, and reduced biliary Ch levels, resulting in a lower Ch saturation index (CSI). In addition, mice fed SS had lower serum TG and Ch levels, increased mRNA expression of liver X receptor α, ATP binding cassette transporter 5/8 (ABCG5/8), and ileal bile acid binding protein (IBABP) in the ileum, and of farnesoid X receptor and bile salt export protein (BSEP) in the liver and ileum. SS also protected against histologically determined liver damage. Overall, these data indicate that SS protects against Ch gallstone formation in mice, and that the effect is mediated by activation of ileal liver X receptor α and hepatic farnesoid X receptor.