In this trial, 390 insulin‐treated patients with type 2 diabetes were randomized to either placebo or metformin. Fasting levels of glucose, insulin and C peptide were determined at baseline, after 4 months and yearly thereafter for 4 years to assess fasting estimates of beta cell function. The primary endpoint was the fasting C peptide‐to‐glucose ratio (FCPGR) and secondary measures were the disposition index (DI) and the fasting C peptide (FCP). We analysed the results with a general linear mixed model. Baseline FCPGR was 5.27 (95% CI, 4.83 – 5.71). Compared to placebo, FCPGR increased in the metformin group with 1.48 (95% CI, 1.09 – 1.87, P < 0.001). The DI showed comparable results with a treatment effect of 1.50 (95% CI, 1.17 – 1.83; P < 0.001). FCP also increased in the metformin group but did not reach statistical significance vs placebo (0.034 nmol, 95% CI, −0.005 – 0.072; P = 0.085). Treatment with metformin vs placebo, added to insulin in patients with type 2 diabetes, improves long‐term estimates of beta cell function in the fasting state.