AIMS/HYPOTHESIS: The prevalence of type 2 diabetes is increasing worldwide, and previous studies have suggested that it is higher in individuals who are seropositive for herpesviruses. This study examines the prospective association of herpesviruses with (pre)diabetes to evaluate their potential role in diabetes aetiology. METHODS: Two follow-up examinations of the German population-based KORA cohort (F4 and FF4) were used to identify participants with normal glucose tolerance at baseline, thus being at risk for (pre)diabetes (n = 1257). All participants had repeated OGTTs and antibody measurements for herpes simplex virus (HSV) 1 and 2, varicella-zoster virus, Epstein-Barr virus, cytomegalovirus (CMV) and human herpesvirus 6 and 7. Regression models were used to evaluate the association between serostatus with (pre)diabetes incidence after a 7 year follow-up and HbA1c. RESULTS: HSV2 and CMV were associated with (pre)diabetes incidence after adjustment for sex, age, BMI, education, smoking, physical activity, parental diabetes, hypertension, lipid levels, insulin resistance and fasting glucose. Seropositivity of both viruses was also cross-sectionally associated with higher HbA1c at baseline, with the association of HSV2 being independent of confounders, including the prevalence of (pre)diabetes itself. While seropositivity for multiple herpesviruses was associated with a higher incidence of (pre)diabetes, this association was not independent of confounders. CONCLUSIONS/INTERPRETATION: The associations of HSV2 and CMV serostatus with (pre)diabetes incidence indicate that these herpesviruses may contribute to the development of impaired glucose metabolism. Our results highlight the link between viral infection and (pre)diabetes, and the need for more research evaluating viral prevention strategies.