Postoperative delirium (POD) is a common postoperative complication. Dysregulation of gut flora is involved in POD through mechanisms such as neuroinflammation, oxidative stress, deposition of β-amyloid, and aberrant production of metabolites of gut flora. Therefore, interventions to regulate gut flora, such as probiotics, prebiotics, and faecal microbiota transplantation, can alleviate cognitive dysfunction. This article reviews the mechanisms of gut flora in POD and its prevention and treatment strategies, with the aim of providing new ideas for the clinical prevention and treatment of POD.