This retrospective cohort study used the nationwide database of Taiwan’s National Health Insurance to investigate whether metformin would reduce the risk of acute appendicitis in patients with type 2 diabetes mellitus. We first identified 423,949 patients newly diagnosed of diabetes from 1999 to 2005. After excluding patients having type 1 diabetes mellitus, missing data, previous history of acute appendicitis, aged < 15 years, aged > 80 years and followed up for < 6 months, 338,172 ever users and 21,861 never users of metformin were followed up from January 1, 2006 until December 31, 2011. Incidence of acute appendicitis was estimated for never users, ever users and subgroups (divided by median, tertiles and quartiles, respectively) of dose–response indicators including cumulative duration (months), cumulative dose (mg) and average daily dose (mg/day) of metformin therapy. We used Cox regression incorporated with the inverse probability of treatment weighting using propensity score to estimate the overall hazard ratio for ever versus never users, and the hazard ratios for subgroups of dose–response indicators versus never users. Results showed that new-onset acute appendicitis was diagnosed in 1558 ever users and 179 never users during follow-up. The incidence was 98.15 per 100,000 person-years in ever users and was 189.48 per 100,000 person-years in never users. The overall hazard ratio (95% confidence interval) of 0.514 (0.441–0.600) suggested a lower risk of acute appendicitis associated with metformin use. A dose–response pattern was consistently observed in the analyses of different subgroups of dose–response indicators and the reduced risk associated with metformin use was consistently observed in various sensitivity analyses. An average daily dose of 1000–1500 mg/day can significantly reduce the risk by > 50%. The benefit did not differ between different formulations of metformin, and the estimated hazard ratio for conventional/immediate-release metformin versus never users was 0.516 (0.441–0.603) and was 0.509 (0.421–0.615) for prolonged/slow-release metformin versus never users. It is concluded that metformin use is associated with a reduced risk of acute appendicitis in patients with type 2 diabetes mellitus.