Clinical and experimental studies have shown that estradiol (E2) confers protection against HIV and other sexually transmitted infections. Here, we investigated the underlying mechanism. Better protection in E2-treated mice, immunized against genital HSV-2, coincided with earlier recruitment and higher proportions of Th1 and Th17 effector cells in the vagina post-challenge, compared to placebo-treated controls. Vaginal APCs isolated from E2-treated mice induced 10-fold higher Th17 and Th1 responses, compared to APCs from progesterone-treated, placebo-treated, and estradiol-receptor knockout mice in APC-T cell co-cultures. CD11c+ DCs in the vagina were the predominant APC population responsible for priming these Th17 responses, and a potent source of IL-6 and IL-1β, important factors for Th17 differentiation. Th17 responses were abrogated in APC-T cell co-cultures containing IL-1β KO, but not IL-6 KO vaginal DCs, showing that IL-1β is a critical factor for Th17 induction in the genital tract. E2 treatment in vivo directly induced high expression of IL-1β in vaginal DCs, and addition of IL-1β restored Th17 induction by IL-1β KO APCs in co-cultures. Finally, we examined the role of IL-17 in anti-HSV-2 memory T cell responses. IL-17 KO mice were more susceptible to intravaginal HSV-2 challenge, compared to WT controls, and vaginal DCs from these mice were defective at priming efficient Th1 responses in vitro, indicating that IL-17 is important for the generation of efficient anti-viral memory responses. We conclude that the genital mucosa has a unique microenvironment whereby E2 enhances CD4+ T cell anti-viral immunity by priming vaginal DCs to induce Th17 responses through an IL-1-dependent pathway.