Enteroviruses are suspected to contribute to insulin-producing β cell loss and hyperglycemia-induced diabetes. However, mechanisms are not fully defined. Here, we show that coxsackievirus B type 4 (CVB4) infection in human islet-engrafted mice and in rat insulinoma cells displays loss of unconventional prefoldin RPB5 interactor (URI) and PDX1, affecting β cell function and identity. Genetic URI ablation in the mouse pancreas causes PDX1 depletion in β cells. Importantly, diabetic PDX1 heterozygous mice overexpressing URI in β cells are more glucose tolerant. Mechanistically, URI loss triggers estrogen receptor nuclear translocation leading to DNA methyltransferase 1 (DNMT1) expression, which induces Pdx1 promoter hypermethylation and silencing. Consequently, demethylating agent procainamide-mediated DNMT1 inhibition reinstates PDX1 expression and protects against diabetes in pancreatic URI-depleted mice . Finally, the β cells of human diabetes patients show correlations between viral protein 1 and URI, PDX1, and DNMT1 levels. URI and DNMT1 expression and PDX1 silencing provide a causal link between enterovirus infection and diabetes.Human diabetic pancreatic samples and data were obtained from the CNIO Biobank thanks to the help of Maria-Jesus Artiga and from Biobanc-Mur, MarBiobank, Vasque Biobank, and Andalusian Public Health System Biobank, integrated in the Spanish Biobank Network and funded by Instituto de Salud Carlos III. We are also thankful to the Biobank of IDIBAPS, Barcelona, for providing samples to A.N. Samples were processed following standard operating procedures with the appropriate approval of the Ethics and Scientific Committees. We also thank the CNIO Mouse Genome Editing Core Unit as well as the CNIO Genomics Unit for their support. We are also thankful to Dr. K. Qvortrup (University of Copenhagen, Denmark) for the electron microscopy. This work was funded by grant to J.P.W. supported by the National Institutes of Health NIAID/NIDDK R01 AI116920, and by grants to N.D. supported by the EFSD/JRDF/Lilly Programme through the European Foundation for the Study of Diabetes (EFSD) and and by the State Research Agency (AEI, 10.13039/501100011033) from the Spanish Ministry of Science and Innovation (projects SAF2016-76598-R, SAF2017-92733-EXP, and RTI2018-094834-B-I00) through the European Regional Development Fund (ERDF). This work was developed at the CNIO, which is funded by the Health Institute Carlos III (ISCIII) and the Spanish Ministry of Science and Innovation.S