Background: Dementia is a common disease influenced by both genetic and environmental factors. APOE4 is well-known to increase the risk of dementia, and it has been shown to attenuate the protective association of fish oil supplementation and the incidence of dementia. To identify more genetic factors with similar modifying effects, we performed a genome-wide scan. Methods: We first performed time-to-event genome-wide association study (GWAS) of all-cause dementia and two of its subtypes, Alzheimer's disease (AD) and vascular dementia, in the UK Biobank. GWAS were performed in all participants (N = 357,631) and in two subgroups with or without fish oil supplementation (N = 113,267 and 244,364, respectively). Single nucleotide polymorphisms (SNPs) suggestively associated with dementia were then evaluated for their interactions with fish oil status in Cox-regression models. Furthermore, we conducted gene set enrichment analysis to identify the relevant cell types for these interaction signals. Results: Time-to-event GWAS identified 6, 5, and 2 genome-wide significant loci (p < 5e-8) for the incidence of all-cause dementia, AD, and vascular dementia, respectively. Most of them overlapped with previously known GWAS loci for AD and related dementia. A total of 178 suggestive GWAS loci (p < 1e-5) were passed onto interaction analysis, and 43 of them were found to significantly modify the association between fish oil supplementation and dementia incidence (p < 2.8e-4 with Bonferroni correction). One locus overlapped with a known AD GWAS locus (EED/PICALM) and two overlapped with GWAS loci for circulating omega-3 fatty acids (SRSF4, PSMG1). Gene set enrichment analysis found that candidate genes of interaction signals demonstrated tissue or cell-type specificity in the brain. Conclusion: We identified 43 genetic loci that modify the association between fish oil supplementation and dementia. These findings indicate a need for genome-informed personalized nutrition of fish oil supplementation for the purpose of dementia prevention.