Activation of macrophages is a key step in the initiation of immune responses, but the transcriptional mechanisms governing macrophage activation during infection are not fully understood. It was recently shown that the AP-1 family transcription factor JUNB positively regulates macrophage activation in response to Toll-like receptor agonists that promote classical or M1 polarization, as well as to the cytokine interleukin-4 (IL-4), which elicits an alternatively activated or M2 phenotype. However, a role for JUNB in macrophage activation has never been demonstrated in vivo. Here, to dissect the role of JUNB in macrophage activation in a physiological setting, mice lacking JUNB specifically in myeloid cells were tested in two infection models: experimental cerebral malaria, which elicits a pathological type 1 immune response, and helminth infection, in which type 2 responses are protective. Myeloid-restricted deletion of Junb reduced type 1 immune activation, which was associated with reduced cerebral pathology and improved survival during infection with Plasmodium berghei. Myeloid JUNB deficiency also compromised type 2 activation during infection with the hookworm Nippostrongylus brasiliensis, leading to diminished cytokine production and eosinophil recruitment and increased parasite burden. These results demonstrate that JUNB in myeloid cells shapes host responses and outcomes during type 1 and type 2 infections.