Lifestyle, obesity, and the gut microbiome are important risk factors for metabolic disorders. We demonstrate in 1,976 subjects of a German population cohort (KORA) that specific microbiota members show 24-h oscillations in their relative abundance and identified 13 taxa with disrupted rhythmicity in type 2 diabetes (T2D). Cross-validated prediction models based on this signature similarly classified T2D. In an independent cohort (FoCus), disruption of microbial oscillation and the model for T2D classification was confirmed in 1,363 subjects. This arrhythmic risk signature was able to predict T2D in 699 KORA subjects 5 years after initial sampling, being most effective in combination with BMI. Shotgun metagenomic analysis functionally linked 26 metabolic pathways to the diurnal oscillation of gut bacteria. Thus, a cohort-specific risk pattern of arrhythmic taxa enables classification and prediction of T2D, suggesting a functional link between circadian rhythms and the microbiome in metabolic diseases.