A hexanucleotide-repeat expansion in C9ORF72 is the most common genetic variant that contributes to amyotrophic lateral sclerosis and frontotemporal dementia. The C9ORF72 mutation acts through gain- and loss-of-function mechanisms to induce pathways that are implicated in neural degeneration. The expansion is transcribed into a long repetitive RNA, which negatively sequesters RNA-binding proteins before its non-canonical translation into neural-toxic dipeptide proteins. The failure of RNA polymerase to read through the mutation also reduces the abundance of the endogenous C9ORF72 gene product, which functions in endolysosomal pathways and suppresses systemic and neural inflammation. Notably, the effects of the repeat expansion act with incomplete penetrance in families with a high prevalence of amyotrophic lateral sclerosis or frontotemporal dementia, indicating that either genetic or environmental factors modify the risk of disease for each individual. Identifying disease modifiers is of considerable translational interest, as it could suggest strategies to diminish the risk of developing amyotrophic lateral sclerosis or frontotemporal dementia, or to slow progression. Here we report that an environment with reduced abundance of immune-stimulating bacteria protects C9orf72-mutant mice from premature mortality and significantly ameliorates their underlying systemic inflammation and autoimmunity. Consistent with C9orf72 functioning to prevent microbiota from inducing a pathological inflammatory response, we found that reducing the microbial burden in mutant mice with broad spectrum antibiotics-as well as transplanting gut microflora from a protective environment-attenuated inflammatory phenotypes, even after their onset. Our studies provide further evidence that the microbial composition of our gut has an important role in brain health and can interact in surprising ways with well-known genetic risk factors for disorders of the nervous system.