Dysregulated immune function is involved in the pathogenesis of many common human diseases. Living in urban, microbe-poor environment may have a profound influence on the immune function and eventually also on carcinogenesis. Unfortunately, few studies have thus far addressed the role of exposure to the environmental microbiota on the risk of cancer. Which mechanisms are broken in individuals prone to develop chronic inflammation in response to exposure that does not cause harm in others? Recent work in immunology has revealed that Th17 cells, a third subset of Th cells, and inflammatory cytokines, particularly IL-23, are closely linked with tumour-associated inflammation. Albeit the precise role of Th17 cells in cancer is still unclear and a matter of debate, accumulating evidence shows that Th17 cells are enriched in a wide range of human tumours, and that these tumour-derived Th17 cells may promote angiogenesis, tumour growth and inflammation. Regulatory T cells, in turn, appear to have counter-regulatory effects on Th17 cells and can inhibit their function. Thus, the regulatory network, induced and strengthened by continuous exposure to environmental microbiota, may play an important role in tumour immunobiology in preventing the establishment of chronic inflammation in its early phases. In addition, the discovery of the Toll-like receptor (TLR) system has brought micro-organisms to new light; continuous signalling via these TLRs and other receptors that sense microbial components is necessary for epithelial cell integrity, tissue repair, and recovery from injury. In this communication, we summarise the epidemiological data of living in environments with diverse microbial exposures and the risk of cancer, and discuss the related immunological mechanisms, focusing on the links between environmental microbiota, the Th17/IL-23 axis and cancer-associated inflammation.