Here Axelsson et al. show that Sox5, which is reduced in diabetes, regulates a set of differentially expressed genes in T2D and its genetic and pharmacological induction improves insulin secretion by diabetic islets. This evidence concerns the gene INS and type 2 diabetes mellitus.