Autoreactive T cell responses have a crucial role in central nervous system (CNS) diseases such as multiple sclerosis. Recent data indicate that CNS autoimmunity can be mediated by two distinct lineages of CD4+ T cells that are defined by the production of either interferon-gamma or interleukin-17. The activity of these CD4+ T cell subsets within the CNS influences the pathology and clinical course of disease. New animal models show that myelin-specific CD8+ T cells can also mediate CNS autoimmunity. This Review focuses on recent progress in delineating the pathogenic mechanisms, regulation and interplay between these different T cell subsets in CNS autoimmunity.