The critical pathogenesis of type 1 diabetes (T1D)/type 2 diabetes (T2D) is the physical status, mass, and function of pancreatic β cells. Mammalian STE20-like protein 1 kinase (MST1) plays vital roles in the apoptosis and insulin secretion of β cells. Here, we discovered a novel, potent, and selective MST1 inhibitor 19 (IC50 = 23 nM), which inhibited the phosphorylation of MST1-protected β cells from the damage of inflammatory cytokines in vitro. In vivo, it displayed acceptable pharmacokinetic properties in different species. In the STZ-induced T1D/T2D mouse models, both monotherapy of 19 and in combination with metformin led to the decline of fasting blood glucose and showed protective effect of β cells. In addition, the combination of 19 and metformin decreased the hemoglobin A1c level. Together, our study suggested that 19 might be a useful pharmacological tool to study MST1-mediated physiology and pathology as well as a potential drug candidate for diabetes.