Cardiac myosin-specific (MyHC) T cells drive the disease pathogenesis of immune checkpoint inhibitor–associated myocarditis (ICI-myocarditis). To determine whether MyHC T cells are tissue-resident memory T (T
RM
) cells, we characterized cardiac T
RM
cells in naive mice and established that they have a distinct phenotypic and transcriptional profile that can be defined by their upregulation of CD69, PD-1, and CXCR6. We then investigated the effects of cardiac injury through a modified experimental autoimmune myocarditis mouse model and an ischemia–reperfusion injury mouse model and determined that cardiac inflammation induces the recruitment of autoreactive MyHC T
RM
cells, which coexpress PD-1 and CD69. To investigate whether the recruited MyHC T
RM
cells could increase susceptibility to ICI-myocarditis, we developed a two-hit ICI-myocarditis mouse model where cardiac injury was induced, mice were allowed to recover, and then were treated with anti-PD-1 antibodies. We determined that mice who recover from cardiac injury are more susceptible to ICI-myocarditis development. We found that murine and human T
RM
cells share a similar location in the heart and aggregate along the perimyocardium. We phenotyped cells obtained from pericardial fluid from patients diagnosed with dilated cardiomyopathy and ischemic cardiomyopathy and established that pericardial T cells are predominantly CD69
+
T
RM
cells that up-regulate PD-1. Finally, we determined that human pericardial macrophages produce IL-15, which supports and maintains pericardial T
RM
cells.