It remains unclear why only a small proportion of individuals infected with the Epstein-Barr virus (EBV) develop multiple sclerosis (MS) and what the underlying mechanisms are. To assess the serologic response to all EBV peptides before the first symptoms of MS occur, determine whether the disease is associated with a distinct immune response to EBV, and evaluate whether specific EBV epitopes drive this response. In this prospective, nested case-control study, individuals were selected among US military personnel with serum samples stored in the US Department of Defense Serum Repository. Individuals with MS had serum collected at a median 1 year before onset (reported to the military in 2000-2011) and were matched to controls for age, sex, race and ethnicity, blood collection, and military branch. No individuals were excluded. The data were analyzed between September 1, 2022, and August 31, 2023. Antibodies (enrichment z scores) to the human virome measured using VirScan (phage-displayed immunoprecipitation and sequencing). Rate ratios (RRs) for MS for antibodies to 2263 EBV peptides (the EBV peptidome) were estimated using conditional logistic regression, adjusting for total anti-EBV nuclear antigen 1 (EBNA-1) antibodies, which have consistently been associated with a higher MS risk. The role of antibodies against other viral peptides was also explored. A total of 30 individuals with MS were matched with 30 controls. Mean (SD) age at sample collection was 27.8 (6.5) years; 46 of 60 participants (76.7%) were male. The antibody response to the EBV peptidome was stronger in individuals with MS, but without a discernible pattern. The antibody responses to 66 EBV peptides, the majority mapping to EBNA antigens, were significantly higher in preonset sera from individuals with MS (RR of highest vs lowest tertile of antibody enrichment, 33.4; 95% CI, 2.5-448.4; P for trend = .008). Higher total anti-EBNA-1 antibodies were also associated with an elevated MS risk (top vs bottom tertile: RR, 27.6; 95% CI, 2.3-327.6; P for trend = .008). After adjusting for total anti-EBNA-1 antibodies, risk estimates from most EBV peptides analyses were attenuated, with 4 remaining significantly associated with MS, the strongest within EBNA-6/EBNA-3C, while the association between total anti-EBNA-1 antibodies and MS persisted. These findings suggest that antibody response to EBNA-1 may be the strongest serologic risk factor for MS. No single EBV peptide stood out as being selectively targeted in individuals with MS but not controls. Larger investigations are needed to explore possible heterogeneity of anti-EBV humoral immunity in MS.