The molecular mechanisms that govern differential T cell development into pro-inflammatory Th17 vs. regulatory T (Treg) cells remain unclear. Here, we show that selective deletion of CREB in T cells or Th17 cells impaired Th17 cell differentiation in vitro and in vivo, and led to resistance to autoimmune diseases. Mechanistically, CREB, activated by CD3-PKC-ϴ signaling, plays a key role in regulating Th17 cell differentiation, at least in part through directly binding to the Il17-Il17f gene locus. Unexpectedly, although dispensable for FOXP3 expression and for the homeostasis and suppressive function of thymus-derived Treg cells, CREB negatively regulates the survival of TGF-β-induced Treg cells, and deletion of CREB resulted in increased FOXP3+ Treg cells in the intestine and protection in a colitis model. Thus, CREB is critical in autoimmune diseases by promoting Th17 cell and inhibiting de novo Treg cell generation.