Human genetics analysis has identified many noncoding SNPs associated with diabetic traits, but whether and how these variants contribute to diabetes is largely unknown. Here, we focus on a noncoding variant, rs6048205, and report that the risk-G variant impairs the generation of PDX1+/NKX6-1+ pancreatic progenitor cells and further results in the abnormal decrease of functional β cells during pancreatic differentiation. Mechanistically, this risk-G variant greatly enhances RXRA binding and over-activates FOXA2 transcription, specifically in the pancreatic progenitor stage, which in turn represses NKX6-1 expression. Consistently, inducible FOXA2 overexpression could phenocopy the differentiation defect. More importantly, mice carrying risk-G exhibit abnormal pancreatic islet architecture and are more sensitive to streptozotocin or a high-fat diet to develop into diabetes eventually. This study not only identifies a causal noncoding variant in diabetes susceptibility but also dissects the underlying gain-of-function mechanism by recruiting stage-specific factors.