Interactions between tumor and immune cells either enhance or inhibit cancer progression. We show here that Stat3 signaling within the tumor microenvironment induces a procarcinogenic cytokine, IL-23, while inhibiting a central anticarcinogenic cytokine, IL-12, thereby shifting the balance of tumor immunity toward carcinogenesis. Stat3 induces expression of IL-23, which is mainly produced by tumor-associated macrophages, via direct transcriptional activation of the IL-23/p19 gene. Furthermore, Stat3 inhibits NF-kappaB/c-Rel-dependent IL-12/p35 gene expression in tumor-associated dendritic cells. Tumor-associated regulatory T cells (Tregs) express IL-23 receptor, which activates Stat3 in this cell type, leading to upregulation of the Treg-specific transcription factor Foxp3 and the immunosuppressive cytokine IL-10. These results demonstrate that Stat3 promotes IL-23-mediated procarcinogenic immune responses while inhibiting IL-12-dependent antitumor immunity.