Diet-induced weight loss is associated with improved beta-cell function in people with type 2 diabetes (T2D) with remaining secretory capacity. It is unknown if adding exercise to diet-induced weight loss improves beta-cell function and if exercise volume is important for improving beta-cell function in this context. Here, we carried out a four-armed randomized trial with a total of 82 persons (35% females, mean age (s.d.) of 58.2 years (9.8)) with newly diagnosed T2D (<7 years). Participants were randomly allocated to standard care (n= 20), calorie restriction (25% energy reduction;n= 21), calorie restriction and exercise three times per week (n= 20), or calorie restriction and exercise six times per week (n= 21) for 16 weeks. The primary outcome was beta-cell function as indicated by the late-phase disposition index (insulin secretion multiplied by insulin sensitivity) at steady-state hyperglycemia during a hyperglycemic clamp. Secondary outcomes included glucose-stimulated insulin secretion and sensitivity as well as the disposition, insulin sensitivity, and secretion indices derived from a liquid mixed meal tolerance test. We show that the late-phase disposition index during the clamp increases more in all three intervention groups than in standard care (diet control group, 58%; 95% confidence interval (CI), 16 to 116; moderate exercise dose group, 105%; 95% CI, 49 to 182; high exercise dose group, 137%; 95% CI, 73 to 225) and follows a linear dose–response relationship (P> 0.001 for trend). We report three serious adverse events (two in the control group and one in the diet control group), as well as adverse events in two participants in the diet control group, and five participants each in the moderate and high exercise dose groups. Overall, adding an exercise intervention to diet-induced weight loss improves glucose-stimulated beta-cell function in people with newly diagnosed T2D in an exercise dose-dependent manner (NCT03769883).