Estradiol (E2) is a sex hormone which has been shown to be protective against sexually transmitted infections such as herpes simplex virus 2 (HSV-2). However, few studies have examined the underlying mechanisms by which this occurs. Here, we investigated the effect of E2 on the establishment of memory T cells post-intranasal immunization with HSV-2. CD4+ T cell responses first appeared in the upper respiratory tract (URT) within 3 days postimmunization before being detected in the female reproductive tract (FRT) at 7 days. E2 treatment resulted in greater and earlier Th17 responses, which preceded augmented Th1 responses at these sites. The CD4+ T cells persisted in the URT for up to 28 days, and E2 treatment resulted in higher frequencies of memory T cells. Intranasal immunization also led to the establishment of CD4+ tissue-resident memory T cells (TRM cells) in the FRT, and E2 treatment resulted in increased Th1 and Th17 TRM cells. When the migration of circulating T cells into the FRT was blocked by FTY720, immunized E2-treated mice remained completely protected against subsequent genital HSV-2 challenge compared to non-E2 controls, confirming that TRM cells alone are adequate for protection in these mice. Finally, the enhanced vaginal Th1 TRM cells present in E2-treated mice were found to be modulated through an interleukin 17 (IL-17)-mediated pathway, as E2-treated IL-17A-deficient mice had impaired establishment of Th1 TRM cells. This study describes a novel role for E2 in enhancing CD4+ memory T cells and provides insight on potential strategies for generating optimal immunity during vaccination.IMPORTANCE 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 Th17 memory cells, which precede enhanced Th1 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.