CD4+ tissue-resident memory T (TRM) cells contribute to host defense and to the pathogenesis of chronic inflammatory diseases, but the molecules that direct their differentiation are unknown. We found that the transcription factor hepatic leukemia factor (HLF) could direct the tissue residency program and function of CD4+ TRM cells. HLF simultaneously up-regulated tissue retention receptors, down-regulated tissue egress receptors, and promoted proinflammatory CD4+ TRM cells by inducing Bhlhe40, and all of these processes were associated with changes in chromatin accessibility. Genetic deletion of Hlf inhibited CD4+ TRM cell generation and ameliorated airway tissue inflammation in vivo. HLF+ CD4+ TRM cells isolated from inflamed airway tissue in humans had a tissue residency signature and expressed inflammatory cytokines. We conclude that HLF may act as a central regulator of proinflammatory CD4+ TRM cell development and function.