Both preoperative supplementation with dietary vitamin B12 plus folic acid and preoperative Sadenosylmethionine injection reduced serum homocysteine levels and prevented the development of postoperative neurocognitive deficits in aged mice. (A) Serum Hcy levels, (B) vitamin B12 levels, and (C) folic acid levels (P = 0.207) at different time points throughout the perioperative period in aged mice fed a control diet or supplemented with a vitamin B12 and folic acid‐rich diet for 2 weeks before surgery (two‐way ANOVA, n = 8 each, mean ± SEM, P < 0.0001, P = 0.01, P = 0.207 respectively). Postoperative cognitive function in these two groups was assessed at 14 days after surgery. (D) and (E) show the statistical results for spatial learning (*P = 0.0027, two‐way ANOVA, n = 8 each, mean ± SEM) and spatial memory (*P = 0.0032, unpaired t‐test, n = 8 each, mean ± SD) in the Barnes maze test. (F) Contextual memory (*P = 0.0047, Mann–Whitney U test, n = 8 each, mean ± SD) and (G) working memory (*P = 0.0148, unpaired t test, n = 8 each, mean ± SD) were also evaluated. (H) The dose‐effect of intraperitoneal injection of SAM induced a reduction in Hcy levels (one‐way ANOVA, n = 12 each, mean ± SEM, **P < 0.01). (I–K) Postoperative cognitive function in the SAM or saline group was assessed 14 days after surgery. (I) Spatial memory (*P = 0.0136, unpaired t‐test, n = 12 each, mean ± SD). (J) Contextual memory (*P = 0.0204, Mann–Whitney U test, n = 12 each, mean ± SD). (K) Working memory (*P = 0.0385, unpaired t‐test, n = 12 each, mean ± SD). (L–N) Correlation analysis between postoperative spatial memory performance at 14 days after surgery and postoperative serum Hcy levels (L), vitamin B12 levels (M) or folic acid levels (N) and (linear regression, n = 12 each) in mice from both the control diet group and the VB12 + FA supplementation diet group