Memory T cells are crucial for both local and systemic protection against pathogens over a long period of time. Three major subsets of memory T cells; effector memory T (TEM) cells, central memory T (TCM) cells, and tissue-resident memory T (TRM) cells have been identified. The most recently identified subset, TRM cells, is characterized by the expression of the C-type lectin CD69 and/or the integrin CD103. TRM cells persist locally at sites of mucosal tissue, such as the lung, where they provide frontline defense against various pathogens. Importantly, however, TRM cells are also involved in shaping the pathology of inflammatory diseases. A number of pioneering studies revealed important roles of CD8+ TRM cells, particularly those in the local control of viral infection. However, the protective function and pathogenic role of CD4+ TRM cells that reside within the mucosal tissue remain largely unknown. In this review, we discuss the ambivalent feature of CD4+ TRM cells in the protective and pathological immune responses. We also review the transcriptional and epigenetic characteristics of CD4+ TRM cells in the lung that have been elucidated by recent technical approaches. A better understanding of the function of CD4+ TRM cells is crucial for the development of both effective vaccination against pathogens and new therapeutic strategies for intractable inflammatory diseases, such as inflammatory bowel diseases and chronic allergic diseases.