BACKGROUND: The anticancer effect of metformin has been reported in the literature but requires additional confirmation in epidemiologic studies. With respect to kidney cancer scarce data are available. This study investigates whether metformin use in patients with type 2 diabetes mellitus (T2DM) might affect kidney cancer risk. METHODS: The reimbursement database of the National Health Insurance in Taiwan was used. T2DM patients aged >/=40 years and newly treated with either metformin (n=171,753, "ever users of metformin") or other antidiabetic drugs (n=75,499, "never users of metformin") within 1998-2002 were followed for at least 6 months for kidney cancer until 31 December 2009. The treatment effect was estimated by Cox regression using propensity score weighting by inverse probability of treatment weighting approach. Hazard ratios were estimated for ever versus never users, and for tertiles of cumulative duration of metformin therapy. RESULTS: During follow-up, 917 ever users and 824 never users developed kidney cancer, with respective incidence of 80.09 and 190.30 per 100,000 person-years. The hazard ratio (95% confidence intervals) for ever versus never users is 0.279 (0.254-0.307); and is 0.598 (0.535-0.668), 0.279 (0.243-0.321) and 0.104 (0.088-0.124), respectively, for the first, second, and third tertile of cumulative duration of <14.5, 14.5-45.8 and >45.8 months. In subgroup analyses, the lower risk of kidney cancer associated with metformin use is consistently observed in both sexes, and in patients with or without concomitant use of other antidiabetic drugs. CONCLUSION: Metformin use is associated with a decreased risk of kidney cancer in patients with T2DM.