Keeping a delicate balance in the immune system by eliminating invading pathogens, while still maintaining self-tolerance to avoid autoimmunity, is critical for the body's health. The gut microbiota that resides in the gastrointestinal tract provides essential health benefits to its host, particularly by regulating immune homeostasis. Moreover, it has recently become obvious that alterations of these gut microbial communities can cause immune dysregulation, leading to autoimmune disorders. Here we review the advances in our understanding of how the gut microbiota regulates innate and adaptive immune homeostasis, which in turn can affect the development of not only intestinal but also systemic autoimmune diseases. Exploring the interaction of gut microbes and the host immune system will not only allow us to understand the pathogenesis of autoimmune diseases but will also provide us new foundations for the design of novel immuno- or microbe-based therapies.