In addition to its canonical function in protecting from pathogens, the immune system can also promote behavioural alterations 1â€"3 . The scope and mechanisms of behavioural modifications by the immune system are not yet well understood. Using a mouse food allergy model, here we show that allergic sensitization drives antigen-specific behavioural aversion. Allergen ingestion activates brain areas involved in the response to aversive stimuli, including the nucleus of tractus solitarius, parabrachial nucleus, and central amygdala. Food aversion requires IgE antibodies and mast cells but precedes the development of gut allergic inflammation. The ability of allergen-specific IgE and mast cells to promote aversion requires leukotrienes and growth and differentiation factor 15 (GDF15). In addition to allergen-induced aversion, we find that lipopolysaccharide-induced inflammation also resulted in IgE-dependent aversive behaviour. These findings thus point to antigen-specific behavioural modifications that likely evolved to promote niche selection to avoid unfavourable environments.