Cancers of the biliary tract arise from the gallbladder, extrahepatic bile ducts and ampulla of Vater. Although relatively uncommon, the incidence of biliary tract cancer rose more than 100% in Shanghai, China between 1972 and 1994. Gallstones are the predominant risk factor for biliary tract cancers, with over 60% of the cancer cases having gallstones. A familial tendency to gallstones has been reported and may elevate the risk of gallbladder cancer further. As part of a large population-based case–control study of biliary tract cancers in Shanghai, China, we examined the association between a family history of gallstones and biliary tract cancers as well as biliary stones. A total of 627 biliary tract cancers (368 gallbladder, 191 bile duct, 68 ampulla of Vater), 1,037 biliary stone cases (774 gallbladder, 263 bile duct) and 959 healthy subjects randomly selected from the population were included in this study. Information on family history of gallstones among first-degree relatives (i.e., parents, siblings, offspring) was obtained through a self-reported history during in-person interviews. A family history of gallstones was associated with increased risks of biliary stones [odds ratio (OR) = 2.8, 95% confidence interval (CI) = 2.1–3.8], gallbladder cancer (OR = 2.1, 95% CI = 1.4–3.3) and bile duct cancer (OR = 1.5, 95% CI = 0.9–2.5), after adjustment for age, gender, marital status, education, smoking, alcohol drinking and body mass index. For gallbladder cancer, subjects with gallstones but without a family history of gallstones had a 21-fold risk (95% CI 14.8–30.1), while those with both gallstones and a positive family history had a 57-fold risk (95% CI 32.0–110.5). Significant risks for gallbladder cancer persisted after additional adjustment for gallstones, and when the analysis was restricted to subjects with first-degree relatives whose gallstones were treated with cholecystectomy. The significant associations with a family history of gallstones were seen for all first-degree relatives, including parents, siblings and offspring, but not spouses. This large population-based study not only supports the role of gallstones in biliary carcinogenesis but also suggests that the underlying genetic or lifestyle determinants of stones within families contribute to the risk of biliary tract cancer. © 2007 Wiley-Liss, Inc.