It is well known that the incidence of postoperative cognitive dysfunction (POCD) is high in elderly patients. The pathogenesis and therapeutic mechanisms of POCD, however, have not yet been completely elucidated. The effects of gut microbiota, particularly in terms of regulating brain function, have gradually attracted increasing attention. In this study, we investigated the potential role of gut microbiota in POCD in aged male mice and attempted to determine whether alterations in gut microbiota would be helpful in the diagnosis of POCD. POCD and non-POCD mice were classified by hierarchical cluster analysis of behavioral results. Additionally, α- and β-diversity of gut microbiota showed a differential profile between the groups. In total, 24 gut bacteria were significantly altered in POCD mice compared with those in non-POCD mice, in which 13 gut bacteria were significantly correlated with escape latency in the Morris water maze test (MWMT). Remarkably, receiver operating characteristic curves revealed that the Dehalobacteriaceae family and Dehalobacterium genus are potentially important bacteria for the diagnosis of POCD. These findings indicate that alterations in the composition of gut microbiota are probably involved in the pathogenesis of POCD in aged mice. Novel therapeutic strategies regulating specific gut bacteria may be helpful for the prevention and treatment of POCD.