Postoperative cognitive dysfunction (POCD) is a common complication after cardiac surgery. Numerous evidence suggest that dysregulation of lipid metabolism is associated with cognitive impairment; however, its precise role in the development of POCD is still obscure. In this study, we established a cardiopulmonary bypass (CPB) model in rats and employed the Barnes maze to assess cognitive function, selecting POCD rats for subsequent experimentation. Utilizing mass spectrometry imaging, we detected plenty of lipids accumulates within the hippocampal CA1in the POCD group. Immunofluorescence staining revealed a significant reduction in the fluorescence intensity of calcium-independent phospholipases A2 (iPLA2) in the POCD group compared to the control, while serine palmitoyl transferase (SPT) was markedly increased in the POCD group. Transmission electron microscopy revealed that the number of synapses in hippocampal CA1decreased significantly and postsynaptic density became thinner in POCD group. Furthermore, after reversing the metabolic disorders of iPLA2 and SPT in the rat brain with docosahexaenoic acid and myriocin, the incidence of POCD after CPB was significantly reduced and the disrupted lipid metabolism in the hippocampus was also normalized. These findings may offer a novel perspective for exploring the etiology and prevention strategies of POCD after CPB.