Although IL-12 is believed to contribute to protective immune responses, the role played by IL-23 (a member of the IL-12 family) in malaria is elusive. Here, we show that IL-23 is produced during infection with Plasmodium berghei NK65. Mice deficient in IL-23 (p19KO) had higher parasitemia and died earlier than wild-type (WT) controls. Interestingly, p19KO mice had lower numbers of IL-17-producing splenic cells than their WT counterparts. Furthermore, mice deficient in IL-17 (17KO) suffered higher parasitemia than the WT controls, indicating that IL-23-mediated protection is dependent on induction of IL-17 during infection. We found that macrophages were responsible for IL-17 production in response to IL-23. We observed a striking reduction in splenic macrophages in the p19KO and 17KO mice, both of which became highly susceptible to infection. Thus, IL-17 appears to be crucial for maintenance of splenic macrophages. Adoptive transfer of macrophages into macrophage-depleted mice confirmed that macrophage-derived IL-17 is required for macrophage accumulation and parasite eradication in the recipient mice. We also found that IL-17 induces CCL2/7, which recruit macrophages. Our findings reveal a novel protective mechanism whereby IL-23, IL-17, and macrophages reduce the severity of infection with blood-stage malaria parasites.