Multiple sclerosis (MS) is a chronic inflammatory disease of the central nervous system characterized by demyelination disseminated in space and time. Here we performed a genome-wide association study (GWAS) using 688 MS cases and 205,199 controls from the Japanese population and identified significant associations in the major histocompatibility complex region and a population-specific risk variant in 11q24. Through cross-population GWAS meta-analyses using a total of 29,374 cases and 1,843,563 controls from 4 ancestral populations, we identified 22 novel susceptibility loci. Integration of GWAS and single-cell and single-nucleus RNA sequencing of peripheral blood mononuclear cells and subcortical lesions from patients with MS revealed enrichment of genetic risk factors for MS in CD4+ T helper cell lineage and regulatory T cells, as well as in endothelial cells. Furthermore, spatial transcriptomics of subcortical lesions demonstrated spatial and temporal heterogeneity in associations with MS genetic risk. Our study demonstrates the value of investigation of spatiocellular features of disease genetics across diverse populations and omics modalities. Multiancestry genome-wide association analyses of multiple sclerosis integrated with single-cell, single-nucleus and spatial transcriptomics data yield insights into the cellular, spatial and temporal heterogeneity underlying disease risk.