Regulatory T cells (T(reg)) expressing the transcription factor Foxp3 control the autoreactive components of the immune system. The development of T(reg) cells is reciprocally related to that of pro-inflammatory T cells producing interleukin-17 (T(H)17). Although T(reg) cell dysfunction and/or T(H)17 cell dysregulation are thought to contribute to the development of autoimmune disorders, little is known about the physiological pathways that control the generation of these cell lineages. Here we report the identification of the ligand-activated transcription factor aryl hydrocarbon receptor (AHR) as a regulator of T(reg) and T(H)17 cell differentiation in mice. AHR activation by its ligand 2,3,7,8-tetrachlorodibenzo-p-dioxin induced functional T(reg) cells that suppressed experimental autoimmune encephalomyelitis. On the other hand, AHR activation by 6-formylindolo[3,2-b]carbazole interfered with T(reg) cell development, boosted T(H)17 cell differentiation and increased the severity of experimental autoimmune encephalomyelitis in mice. Thus, AHR regulates both T(reg) and T(H)17 cell differentiation in a ligand-specific fashion, constituting a unique target for therapeutic immunomodulation.