Blood campesterol levels have been associated with gallstones44, but it is uncertain whether the relationship is causal. We identified associations at the ABCG8 intronic variant rs6544713 with lower campesterol level in METSIM (MAF = 20.1%, β = −0.33, P = 2.7 × 10−37) and higher gallstone risk in FinnGen (OR = 1.32, P = 8.0 × 10−65). In 4689 METSIM participants with observed campesterol levels, 199 with gallstones, plasma campesterol level was inversely associated with gallstone risk (β = −0.52, P = 3.7 × 10−5). This evidence concerns the gene ABCG8 and gallstones.