A growing body of evidence has shown that resident memory T (TRM) cells formed in tissue after mucosal infection or vaccination are crucial for counteracting reinfection by pathogens. However, whether lung TRM cells activated by oral immunization with Yptb1(pYA5199) play a protective role against pneumonic plague remains unclear. In this study, we demonstrated that lung CD4+ and CD8+ TRM cells significantly accumulated in the lungs of orally Yptb1(pYA5199)-vaccinated mice and dramatically expanded with elevated IL-17A, IFN-γ, and/or TNF-α production after pulmonary Yersinia pestis infection and afforded significant protection. Short-term or long-term treatment of immunized mice with FTY720 did not affect lung TRM cell formation and expansion or protection against pneumonic plague. Moreover, the intratracheal transfer of both lung CD4+ and CD8+ TRM cells conferred comprehensive protection against pneumonic plague in naive recipient mice. Lung TRM cell–mediated protection was dramatically abolished by the neutralization of both IFN-γ and IL-17A. Our findings reveal that lung TRM cells can be activated via oral Yptb1(pYA5199) vaccination, and that IL-17A and IFN-γ production play an essential role in adaptive immunity against pulmonary Y. pestis infection. This study highlights an important new target for developing an effective pneumonic plague vaccine.