Cure of type 1 diabetes (T1D) by immune intervention at disease onset depends on the restoration of insulin secretion by endogenous beta cells. However, little is known about the potential of beta cell mass and function to recover after autoimmune attack ablation. Utilizing a longitudinal in vivo imaging approach we here show how functional status and mass of beta cells adapt in response to onset and remission of T1D. We demonstrate that infiltration reduces beta cell mass prior to diabetes and, together with emerging hyperglycemia, affects beta cell function. After immune intervention persisting hyperglycemia prevents functional recovery, but promotes beta cell mass increase in mouse islets. When blood glucose levels return to normoglycemia beta cell mass expansion stops and subsequently glucose tolerance recovers in combination with beta cell function. Similar to mouse, human islets exhibit cell exhaustion and recovery in response to transient hyperglycemia. However, the effect of hyperglycemia on human islet mass increase is minor and transient. Our data demonstrate a major role of functional exhaustion and recovery of beta cells during diabetes onset and remission. Therefore, these findings support early intervention therapy of diabetes.