Homozygous mutations in the autoimmune regulator (AIRE) gene that cripple thymic negative selection of autoreactive T cells result in autoimmune polyendocrinopathy‐candidiasis‐ectodermal dystrophy (APECED). However, how AIRE regulates the T‐cell response against foreign pathogens is not well understood. Here, we observed comparable primary CD8+ T cells but a markedly reduced memory T‐cell population and protective function in Aire−/− mice compared with wild‐type after infection with a strain of recombinant Listeria monocytogenes. In adoptive transfer models, exogenous congenic CD8+ T cells transferred into Aire−/− mice also showed a reduction in the memory T‐cell population, indicating an important role for extrathymic Aire‐expressing cells in shaping or sustaining memory T cells. Moreover, using a bone marrow chimeric model, we found that Aire expressed in radioresistant cells plays an important role in maintaining the memory phenotype. These results provide important insights into the role of extrathymic Aire in the T‐cell response to infection.