Epithelial resident memory T (eTRM) cells serve as sentinels in barrier tissues to guard against previously encountered pathogens. How eTRM cells are generated has important implications for efforts to elicit their formation through vaccination or prevent it in autoimmune disease. Here, we show that during immune homeostasis, the cytokine transforming growth factor β (TGF-β) epigenetically conditions resting naïve CD8+ T cells and prepares them for the formation of eTRM cells in a mouse model of skin vaccination. Naïve T cell conditioning occurs in lymph nodes (LNs), but not in the spleen, through major histocompatibility complex class I–dependent interactions with peripheral tissue–derived migratory dendritic cells (DCs) and depends on DC expression of TGF-β–activating αV integrins. Thus, the preimmune T cell repertoire is actively conditioned for a specialized memory differentiation fate through signals restricted to LNs.