The gut microbiota is essential for the normal function of the gut immune system and microbiota alterations are associated with autoimmune disorders. However how the gut microbiota prevents autoimmunity in distant organs remains poorly defined. Using various methods to manipulate the gut microbiota, we demonstrate its critical role in the maintenance of the immune tolerance in the pancreas via the induction of immunoregulatory antimicrobial peptides, hence preventing the development of autoimmune diabetes in mouse model. The expanding knowledge in this field supports the use of gut microbiota manipulation as a novel treatment strategy against type 1 diabetes.