During the pathogenesis of type 1 diabetes (T1D) and type 2 diabetes (T2D), pancreatic islets, especially the β cells, face significant challenges. These insulin-producing cells adopt a regeneration strategy to compensate for the shortage of insulin, but the exact mechanism needs to be defined. High-fat diet (HFD) and streptozotocin (STZ) treatment are well-established models to study islet damage in T2D and T1D respectively. Therefore, we applied these two diabetic mouse models, triggered at different ages, to pursue the cell fate transition of islet β cells. Cre-LoxP systems were used to generate islet cell type-specific (α, β, or δ) green fluorescent protein (GFP)-labeled mice for genetic lineage tracing, thereinto β-cell GFP-labeled mice were tamoxifen induced. Single-cell RNA sequencing (scRNA-seq) was used to investigate the evolutionary trajectories and molecular mechanisms of the GFP-labeled β cells in STZ-treated mice. STZ-induced diabetes caused extensive dedifferentiation of β cells and some of which transdifferentiated into a or δ cells in both youth- and adulthood-initiated mice while this phenomenon was barely observed in HFD models. β cells in HFD mice were expanded via self-replication rather than via transdifferentiation from α or δ cells, in contrast, α or δ cells were induced to transdifferentiate into β cells in STZ-treated mice (both youth- and adulthood-initiated). In addition to the re-dedifferentiation of β cells, it is also highly likely that these "α or δ" cells transdifferentiated from pre-existing β cells could also re-trans-differentiate into insulin-producing β cells and be beneficial to islet recovery. The analysis of ScRNA-seq revealed that several pathways including mitochondrial function, chromatin modification, and remodeling are crucial in the dynamic transition of β cells. Our findings shed light on how islet β cells overcome the deficit of insulin and the molecular mechanism of islet recovery in T1D and T2D pathogenesis.