Transient thymic involution is frequently found during inflammation, yet the mode of action of inflammatory cytokines is not well defined. Here we report that interleukin-23 (IL-23) production by the thymic dendritic cells (DCs) promotes apoptosis of the CD4(hi)CD8(hi) double-positive (DP) thymocytes. A deficiency in IL-23 signalling interferes with negative selection in the male D(b)/H-Y T-cell receptor (TCR) transgenic mice. IL-23 plus TCR signalling results in significant upregulation of IL-23 receptor (IL-23R) expressed predominantly on CD4(hi)CD8(hi)CD3(+)αβTCR(+) DP thymocytes, and leads to RORγt-dependent apoptosis. These results extend the action of IL-23 beyond its peripheral effects to a unique role in TCR-mediated negative selection including elimination of natural T regulatory cells in the thymus.