PurposeTo compare the effects of remimazolam and dexmedetomidine on early postoperative cognitive dysfunction (POCD) in aged gastric cancer patients.MethodsFrom June to December 2022, 104 elderly patients (aged 65–80 years) received laparoscopic radical resection of gastric cancer at the First Affiliated Hospital of Nanchang University. Using the random number table approach, the patients were separated into three groups: remimazolam (Group R), dexmedetomidine (Group D), and saline (Group C). The primary outcome was the incidence of POCD, and secondary outcomes included TNF-α and S-100β protein concentrations, hemodynamics, VAS scores, anesthesia recovery indicators, and the occurrence of adverse events within 48 h postoperatively.ResultsAt 3 and 7 days after surgery, there were no statistically significant differences in the incidence of POCD, the MMSE and MoCA scores between groups R and D (p > 0.05). However, compared to the saline group, both groups had higher MMSE and MoCA scores and decreased incidences of POCD. These differences were statistically significant (p 0.05) in the levels of TNF-α and S-100β protein at the three time points (at the end of the surgery, 1 day later, and 3 days later). Even though neither group’s concentration of the two factors was as high as that of the saline group, the differences were statistically significant (p group R > group D. Extubation and PACU residence times did not differ statistically significantly (p > 0.05) between the three groups. There was no significant difference in VAS scores between groups R and D after 24 h postoperatively (p > 0.05), although both had lower scores than group C, and the difference was statistically significant (p 0.05). Adverse reactions such as respiratory depression, hypotension, bradycardia, agitation, drowsiness, and nausea and vomiting had the lowest incidence in group R and the highest incidence in group C (p