IL-17–producing Th17 cells mediate immune responses against a variety of fungal and bacterial infections. Signaling via NF-κB has been linked to the development and maintenance of Th17 cells. We analyzed the role of the unusual inhibitor of NF-κB, IκBNS, in the proliferation and effector cytokine production of murine Th17 cells. Our study demonstrates that nuclear IκBNS is crucial for murine Th17 cell generation. IκBNS is highly expressed in Th17 cells; in the absence of IκBNS, the frequencies of IL-17A–producing cells are drastically reduced. This was measured in vitro under Th17-polarizing conditions and confirmed in two colitis models. Mechanistically, murine IκBNS−/− Th17 cells were less proliferative and expressed markedly reduced levels of IL-2, IL-10, MIP-1α, and GM-CSF. Citrobacter rodentium was used as a Th17-inducing infection model, in which IκBNS−/− mice displayed an increased bacterial burden and diminished tissue damage. These results demonstrate the important function of Th17 cells in pathogen clearance, as well as in inflammation-associated pathology. We identified IκBNS to be crucial for the generation and function of murine Th17 cells upon inflammation and infection. Our findings may have implications for the therapy of autoimmune conditions, such as inflammatory bowel disease, and for the treatment of gut-tropic infections.