The APOE-ε4 total effect on delirium was partially mediated by dementia (OR indirect effect (0vs1) 1.39, 95% CI 1.36–1.42; P = 1.1 × 10−237; and OR indirect effect (0vs2) 2.59, 95% CI 2.47–2.77; P = 2.1 × 10−233), with the direct effect accounting for 29% and 21% of the total effect for one and two APOE-ε4 copies, respectively. This evidence concerns the gene APOE and delirium.