Background and purposeProdromal infection is associated with neuromyelitis optica spectrum disorder (NMOSD), but which type of infection had causal relations with NMOSD remains unclear. We aimed to explore the causal relations between four herpesvirus infections (chickenpox, cold sores, mononucleosis and shingles) and NMOSD, as well as other types of infections and NMOSD.MethodsFor infections, the genome‐wide association study (GWAS) summary statistics from the 23andMe cohort were used. For outcomes, the GWAS of participants from European ancestry was used, including 215 NMOSD patients (132 anti‐aquaporin‐4 antibody [AQP4‐ab]‐positive patients and 83 AQP4‐ab‐negative patients) and 1244 normal controls. Single nucleotide polymorphism (SNP) identification and two‐sample mendelian randomization (MR) analyses were then performed.ResultsIn 23andMe cohort, we identified one SNP (rs9266089 in HLA‐B gene) for chickenpox, one SNP (rs885950 in POU5F1 gene) for cold scores, one SNP (rs2596465 in HCP5 gene) for mononucleosis, three SNPs (rs2523591 in HLA‐B gene; rs7047299 in IFNA21 gene; rs9260809 in MICD gene) for shingles. The relation of cold sores and AQP4‐ab‐positive NMOSD reached statistical significance (OR [95%CI] = 745.318 [22.176, 25049.53], P < 0.001, Q < 0.001). The association of shingles and AQP4‐ab‐positive NMOSD was statistically significant (OR [95%CI] = 21.073 [4.271, 103.974], P < 0.001, Q < 0.001). No significant association was observed between other infections and AQP4‐ab‐positive or AQP4‐ab‐negative NMOSD.ConclusionThese findings suggested the positive associations between cold sores, shingles and AQP4‐ab‐positive NMOSD, indicating there may be causal relations between herpes simplex virus, varicella‐zoster virus infection and AQP4‐ab‐positive NMOSD.