Abstract Recent advances in next-generation sequencing (NGS) technologies have opened the door to a wellspring of information regarding the composition of the gut microbiota. Leveraging NGS technology, early metagenomic studies revealed that several diseases, such as Alzheimer’s disease, Parkinson’s disease, autism, and myalgic encephalomyelitis, are characterized by alterations in the diversity of gut-associated microbes. More recently, interest has shifted toward understanding how these microbes impact their host, with a special emphasis on their interactions with the brain. Such interactions typically occur either systemically, through the production of small molecules in the gut that are released into circulation, or through signaling via the vagus nerves which directly connect the enteric nervous system to the central nervous system. Collectively, this system of communication is now commonly referred to as the gut-microbiota-brain axis. While equally important, little attention has focused on the causes of the alterations in the composition of gut microbiota. Although several factors can contribute, mucosal immunity plays a significant role in shaping the microbiota in both healthy individuals and in association with several diseases. The purpose of this review is to provide a brief overview of the components of mucosal immunity that impact the gut microbiota and then discuss how altered immunological conditions may shape the gut microbiota and consequently affect neuroimmune diseases, using a select group of common neuroimmune diseases as examples. Open access, https://www.mdpi.com/1422-0067/23/21/13328/htm