We identify a host-microbiome interaction fundamental to the aetiology of Type 1 diabetes (T1D), a T-cell-mediated destruction of pancreatic β cells, owing to a loss of immune tolerance to primary insulin epitope. We show how variation in the human leukocyte antigen (HLA) class II region, DQβ57, the strongest T1D genetic risk factor, induces a thymic selection bias that favors increased frequency of insulin reactive T cells in the periphery. Furthermore, we describe a large set of gut commensal proteins, enriched with enzymes involved in metabolism of polysaccharides, with similarity to the primary insulin epitope. We demonstrate that islet infiltrates from early stage T1D contain T cells cross-reactive to bacterial mimics and insulin peptides. Our findings establish a connection between microbial metabolism of polysaccharides, dysbiosis in the infant gut, and antigen-specific immune responses to insulin, offering new strategies for disease prevention.