The possible association between the risk of ovarian cancer and the levels of calcium and magnesium in drinking water from municipal supplies was investigated in a matched case-control study in Taiwan. All eligible ovarian cancer deaths (933 cases) of Taiwan residents from 1986 through 2000 were compared with a sample of deaths from other causes (933 controls), and the levels of calcium and magnesium in the drinking water of these residents were determined. Data on calcium and magnesium levels in drinking water throughout Taiwan were obtained from the Taiwan Water Supply Corporation (TWSC). The control group consisted of people who died from other causes, and the controls were pair-matched to the cases by sex, year-of-birth, and year-of-death. Compared to those with magnesium levels below 7.3 mg/liter, the adjusted odd ratios (95% confidence interval (CI)) were 0.71 (0.55-0.92) for the group with water magnesium levels between 7.3 and 13.4 mg/liter and 0.57 (0.43-0.76) for the group with magnesium levels of 13.5 mg/liter or more. The adjusted odd ratios were not statistically significant for the relationship between calcium levels in drinking water and ovarian cancer. The results of the present study show that there may be a significant protective effect of magnesium intake from drinking water on the risk of ovarian cancer death.