Interleukin-2 and interleukin-15 have pivotal roles in the control of the life and death of lymphocytes. Although their heterotrimeric receptors have two receptor subunits in common, these two cytokines have contrasting roles in adaptive immune responses. The unique role of interleukin-2 is in the elimination of self-reactive T cells to prevent autoimmunity. By contrast, interleukin-15 is dedicated to the prolonged maintenance of memory T-cell responses to invading pathogens. As discussed in this Review, the biology of these cytokines will affect the development of novel therapies for malignancy and autoimmune diseases, as well as the design of vaccines against infectious diseases.