Objective To evaluate metformin effects on endometrial cancer risk in Chinese female patients with type 2 diabetes mellitus (T2DM) in Taiwan. Methods This is a retrospective cohort analysis using the National Health Insurance database of Taiwan. Female patients with newly diagnosed T2DM and without endometrial cancer in 1998–2002 were followed to end of 2009 (n= 478921). Among them, 285916 were never-users and 193005 were ever-users of metformin. A time-dependent approach was used to calculate endometrial cancer incidence and estimate hazard ratios by Cox regression for ever-users, never-users, and subgroups of metformin exposure (tertiles of cumulative duration and cumulative dose). Sensitivity analyses were conducted in various subgroups. Results During follow-up, 728 metformin ever-users and 2157 never-users developed endometrial cancer, representing an incidence of 60.00 and 121.69 per 100,000 person-years, respectively. The overall hazard ratio (95% confidence intervals) for ever- versus never-users after adjustment for propensity score (PS) was 0.675 (0.614-0.742). The PS-adjusted hazard ratios for the first, second, and third tertiles of cumulative duration of metformin therapy were 1.089 (0.966-1.228), 0.707 (0.616-0.812) and 0.313 (0.262-0.374), respectively (P-trend < 0.0001); and 1.062 (0.942-1.197), 0.620 (0.538-0.715) and 0.376 (0.317-0.447), respectively (P-trend < 0.0001), for cumulative dose of metformin. The dose–response relationship was demonstrated in various models and an overall reduced risk was consistently supported by sensitivity analyses. Conclusions Use of metformin in women with T2DM was associated with an overall significantly lower risk of endometrial cancer with dose–response relationship.