Abstract Background Opioid-free anesthesia (OFA) is associated with significantly reduced cumulative postoperative morphine consumption in comparison with opioid-based anesthesia (OBA). Whether OFA is feasible and may improve outcomes in pancreatic surgery remains unclear. Methods Perioperative data from 77 consecutive patients who underwent pancreatic resection were included and retrospectively reviewed. Patients received either an OBA with intraoperative remifentanil (n = 42) or an OFA (n = 35). OFA included a combination of continuous infusions of dexmedetomidine, lidocaine, and esketamine. In OBA, patients also received a single bolus of intrathecal morphine. All patients received intraoperative propofol, sevoflurane, dexamethasone, diclofenac, neuromuscular blockade. Postoperative pain management was achieved by continuous wound infiltration and patient-controlled morphine. The primary outcome was postoperative pain (Numerical Rating Scale, NRS). Opioid consumption within 48 h after extubation, length of stay, adverse events within 90 days, and 30-day mortality were included as secondary outcomes. Episodes of bradycardia and hypotension requiring rescue medication were considered as safety outcomes. Results Compared to OBA, NRS (3 [2–4] vs 0 [0–2], P