Studies in neuroscience and immunology have clarified much of the anatomical and cellular basis for bidirectional interactions between the nervous and immune systems. As with other organs, intestinal immune responses and the development of immunity seems to be modulated by neural reflexes. Sympathetic immune modulation and reflexes are well described, and in the past decade the parasympathetic efferent vagus nerve has been added to this immune-regulation network. This system, designated 'the inflammatory reflex', comprises an afferent arm that senses inflammation and an efferent arm that inhibits innate immune responses. Intervention in this system as an innovative principle is currently being tested in pioneering trials of vagus nerve stimulation using implantable devices to treat IBD. Patients benefit from this treatment, but some of the working mechanisms remain to be established, for instance, treatment is effective despite the vagus nerve not always directly innervating the inflamed tissue. In this Review, we will focus on the direct neuronal regulatory mechanisms of immunity in the intestine, taking into account current advances regarding the innervation of the spleen and lymphoid organs, with a focus on the potential for treatment in IBD and other gastrointestinal pathologies.