Human embryonic stem cells (hESCs) derived β cells (SC-β cells) hold great promise for diabetes treatment, yet how to achieve functional maturation of these SC-β cells and protect them against metabolic stresses such as glucotoxicity and lipotoxicity remain elusive. By single cell RNA-seq pseudotime analysis, we revealed that ZnT8 is involved in SC-β cells functional maturation process and its loss of function (LOF) accelerates functional maturation of SC-β cells. As a result, ZnT8 LOF improves glucose-stimulated insulin secretion (GSIS) and enhances proinsulin to insulin conversion efficiency in SC-β cells, both in vitro and in vivo, by releasing the negative feedback of zinc inhibition on insulin secretion. Furthermore, SC-β cells with ZnT8 LOF are resistant to metabolic stresses induced cell death, as lipotoxicity or glucotoxicity, displaying higher survival. Most importantly, transplantation of SLC30A8-/- SC-β cells into diabetic mice significantly improves glycemia restoration and SC-β cell survival with long-term stability. Therefore, our study offers an advanced cell replacement therapy for diabetes with both improved SC-β cell survival and function against metabolic stress.