Tissue-resident memory T cells (T(RM) cells) provide superior protection against infection in extralymphoid tissues. Here we found that CD103(+)CD8(+) T(RM) cells developed in the skin from epithelium-infiltrating precursor cells that lacked expression of the effector-cell marker KLRG1. A combination of entry into the epithelium plus local signaling by interleukin 15 (IL-15) and transforming growth factor-β (TGF-β) was required for the formation of these long-lived memory cells. Notably, differentiation into T(RM) cells resulted in the progressive acquisition of a unique transcriptional profile that differed from that of circulating memory cells and other types of T cells that permanently reside in skin epithelium. We provide a comprehensive molecular framework for the local differentiation of a distinct peripheral population of memory cells that forms a first-line immunological defense system in barrier tissues.