The evolution of resistance to parasites has been the focus of numerous theoretical studies and several mechanisms, ranging from innate to acquired immune responses, have been considered. Life-history theory predicts that long-lived species should invest more resources into maintenance and immunity than short-lived species. Here, we provide further theoretical and empirical support for this hypothesis. First, an analysis of the evolution of the persistence of immune protection in a theoretical framework accounting for maternal transfer of immunity reveals that longer-lived hosts are expected to invest in more persistent intragenerational and transgenerational immune responses. Controlling for phylogenetic structure and for the confounding effect of catabolic activity, we further showed that immunoglobulin half-life and longevity are positively correlated in mammal species. Our study confirms that persistence of immunity has evolved as part of elaborate anti-parasitic defence strategies.