Genes involved in distinct diabetes types suggest shared disease mechanisms. We show that rare ONECUT1 coding variants cause monogenic recessive diabetes (neonatal or very early-onset, syndromic) in two unrelated patients, and monogenic dominant diabetes (early adult-onset) in heterozygous relatives of these and 13 additional unrelated cases. Patients heterozygous for rare ONECUT1 coding variants define a subgroup of T2D with early-onset diabetes and other features. In addition, common regulatory ONECUT1 variants are associated with multifactorial T2D. Directed differentiation of human pluripotent stem cells to the pancreatic lineage revealed that loss of ONECUT1 impairs pancreatic progenitor formation and a subsequent endocrine program. We uncovered that ONECUT1 activates the pro-endocrine genes NKX6.1 and NKX2.2 through binding to their cis-regulatory elements. Globally, ONECUT1-directed gene transcription occurs in association with major islet transcription factors, at clusters of pancreas- and endocrine-specific enhancers within open chromatin. ONECUT1 regulates a transcriptional and epigenetic machinery critical for proper endocrine pancreatic development, involved in a spectrum of diabetes, monogenic recessive and dominant, and multifactorial.