Immune responses, either constitutive or induced, are costly. An alternative defence strategy may be based on behavioural responses. For example, avoidance behaviour reduces contact with pathogens and thus the risk of infection as well as the requirement of immune system activation. Similarly, if pathogens are taken up orally, preferential feeding of pathogen-free food may be advantageous. Behavioural defences have been found in many animals, including the nematode
Caenorhabditis elegans
. We here tested nematodes from a laboratory based evolution experiment which had either coevolved with their microparasite
Bacillus thuringiensis
(BT) or evolved under control conditions. After 48 generations, coevolved populations were more sensitive to food conditions: in comparison with the controls, they reduced feeding activity in the presence of pathogenic BT strains while at the same time increasing it in the presence of non-pathogenic strains. We conclude that host–parasite coevolution can drive changes in the behavioural responsiveness to bacterial microbes, potentially leading to an increased defence against pathogens.