Background: To investigate the effects of dexmedetomidine on perioperative potassium and postoperative rehabilitation. Methods: Totally 124 patients scheduled for elective radical resection of gastrointestinal malignant tumor under general anesthesia were included. and randomly assigned to four groups (n=31): groups D1, D2 and D3 received dexmedetomidine loading dose 1, 1 and 0.5 μg/kg and maintenance dose 0.25, 0.5 and 0.5 μg/kg/h, respectively, group C received normal saline 50 ml/h for 10 min and maintenance dose 10 ml/h. Serum potassium and lactate changes were recorded at 5 min after arteriovenous puncture (T1), 1 h after surgery beginning (T6), surgery ending (T7) and 1 h into the post-anesthesia care unit (PACU) (T10). Serum potassium was examined at 48 h after surgery (T11). Perioperative rehabilitation indicators were recorded.Results: Compared with basal values, serum potassium concentration in groups C, D1 and D2 increased significantly at T11 (P=0.003, 0.002, and ˂0.001, respectively) and at T7 (P=0.008), T10 (P=0.015) and T11 (P˂0.001) in group D3. Serum potassium at T11 in group D2 was significantly lower than group C (P=0.032). Serum potassium at T7 in group D3 was significantly higher than group D2 (P=0.036). There were no significant differences in perioperative rehabilitation indicators in all groups. Conclusions: Dexmedetomidine did not decrease perioperative potassium significantly in patients undergoing radical resection of gastrointestinal malignancy, while its loading dose 0.5 μg/kg and maintenance dose 0.5 μg/kg/h can elevate potassium slightly with no adverse effect on perioperative rehabilitation.Trial registration: This study was retrospectively registered on the clinicaltrials.gov website (registration number: NCT04771637).