Peripheral central nervous system (CNS)-infiltrating lymphocytes are a hallmark of relapsing-remitting multiple sclerosis. Tissue-resident memory T cells (TRM) not only populate the healthy CNS parenchyma but also are suspected to contribute to multiple sclerosis pathology. Because cerebrospinal fluid (CSF), unlike CNS parenchyma, is accessible for diagnostics, we evaluated whether human CSF, apart from infiltrating cells, also contains TRM cells and CNS-resident myeloid cells draining from the parenchyma or border tissues. Using deep generative models, we integrated 41 CSF and 14 CNS parenchyma single-cell RNA sequencing (scRNAseq) samples from eight independent studies, encompassing 120,629 cells. By comparing CSF immune cells collected during multiple sclerosis relapse with cells collected during therapeutic very late antigen-4 blockade, we could identify immune subsets with tissue provenance across multiple lineages, including CNS border-associated macrophages, CD8 and CD4 TRM cells, and tissue-resident natural killer cells. All lymphocytic CNS-resident cells shared expression of CXCR6 but showed differential ITGAE expression (encoding CD103). A common signature defined CD4 and CD8 TRM cells by expression of ZFP36L2, DUSP1, and ID2. We further developed a user interface-driven application based on this analysis framework for atlas-level cell identity transfer onto new CSF scRNAseq data. Together, these results define CNS-resident immune cells involved in multiple sclerosis pathology that can be detected and monitored in CSF. Targeting these cell populations might be promising to modulate immunopathology in progressive multiple sclerosis and other neuroinflammatory diseases.