The skin surface and internal mucosa of the human body are the primary sites that expose to the outer environment and accommodate trillions of microorganisms. This article focuses on the intimate relationship between the human immune system and the entire population of gut microflora, collectively known as the gut microbiota. The gut microbiota can regulate the metabolism and gut immunity. Lack of the gut microflora may lead to developmental defects in both the gut immune system and mucosal integrity. Although the gut commensal microorganisms and pathogens share many common components that can induce the host immune response, the gut immune system has evolved to tolerate the gut microflora, but respond well to the invasion of pathogens. The gut microbiota is composed of a variety of species, and distinct species may cause different immune responses. There exist different immune cells with different functions, including pro-inflammatory TH17 cells and anti-inflammatory regulatory T cells (Treg), in the gut. The former prevents the infection of pathogens, whereas the latter maintains the homeostasis of the gut immunity. Using special animal models, several species of commensal microbiota were found to promote the differentiation of TH17 and Treg cells. Imbalance of the gut microbiota, known as dysbiosis, contributes to the development of several diseases, including inflammatory bowel disease. In addition to the gut immunity, the gut microbiota can also affect the extra-intestinal immune system. For example, asthma and autoimmune disease are associated with the dysbiosis of the gut microbiota. Along with the progress of the research on the gut microbiota, we start to understand the underlying mechanisms involved in regulation of the host health and disease by the gut microbiota. Knowledge of this may help to develop better strategy to improve the host immune system and provide a novel opportunity to prevent and treat the intestinal and systemic disorders.