Herpes simplex virus 2 (HSV-2) is a highly prevalent sexually transmitted infection for which there is currently no vaccine available. Interestingly, the female sex hormone estradiol has been shown to be protective against HSV-2. However, the underlying mechanisms by which this occurs remains relatively unknown. Our study demonstrates that under the influence of estradiol treatment, intranasal immunization with an attenuated strain of HSV-2 leads to enhanced establishment of antiviral memory T cell responses in the upper respiratory tract and female reproductive tract. In these sites, estradiol treatment leads to greater T h 17 memory cells, which precede enhanced T h 1 memory responses. Consequently, the T cell responses mounted by tissue-resident memory cells in the female reproductive tract of estradiol-treated mice are sufficient to protect mice against vaginal HSV-2 challenge. This study offers important insights regarding the regulation of mucosal immunity by hormones and on potential strategies for generating optimal immunity during vaccination.