Over a decade ago, the discovery of transgenerational immunity in invertebrates shifted existing paradigms on the lack of sophistication of their immune system. Nonetheless, the prevalence of this trait and the ecological factors driving its evolution in invertebrates remain poorly understood. Here, we develop a theoretical host -parasite model and predict that long lifespan and low dispersal should promote the evolution of transgenerational immunity. We also predict that in species that produce both philopatric and dispersing individuals, it may pay to have a plastic allocation strategy with a higher transgenerational immunity investment in philopatric offspring because they are more likely to encounter locally adapted pathogens. We review all experimental studies published to date, comprising 21 invertebrate species in nine different orders, and we show that, as expected, longevity and dispersal correlate with the transfer of immunity to offspring. The validity of our prediction regarding the plasticity of investment in transgenerational immunity remains to be tested in invertebrates, but also in vertebrate species. We discuss the implications of our work for the study of the evolution of immunity, and we suggest further avenues of research to expand our knowledge of the impact of transgenerational immune protection in host -parasite interactions.