Type 2 diabetes is thought to involve a compromised β cell differentiation state, but the mechanisms underlying this dysfunction remain unclear. Here, we report a key role for the TF PAX6 in the maintenance of adult β cell identity and function. PAX6 was downregulated in β cells of diabetic db/db mice and in WT mice treated with an insulin receptor antagonist, revealing metabolic control of expression. Deletion of Pax6 in β cells of adult mice led to lethal hyperglycemia and ketosis that were attributed to loss of β cell function and expansion of α cells. Lineage-tracing, transcriptome, and chromatin analyses showed that PAX6 is a direct activator of β cell genes, thus maintaining mature β cell function and identity. In parallel, we found that PAX6 binds promoters and enhancers to repress alternative islet cell genes including ghrelin, glucagon, and somatostatin. Chromatin analysis and shRNA-mediated gene suppression experiments indicated a similar function of PAX6 in human β cells. We conclude that reduced expression of PAX6 in metabolically stressed β cells may contribute to β cell failure and α cell dysfunction in diabetes.