Gastrointestinal dysfunction is common in patients after major surgery, especially for neurosurgery. It was reported 80% of neurosurgery patients could be combined with gastrointestinal dysfunction, and it may relate to old age, surgery time, and factors of anesthesia and surgery. Meanwhile, postoperative constipation, nausea, and vomiting induced by gastrointestinal dysfunction may increase the intracranial bleeding. Oliceridine could activate mu opioid receptors without the interaction of (beta)arr2-muOR, and may reduce the gastrointestinal dysfunction, but a limited study has illustrated this topic. Thus, this study is conducted to explore whether oliceridine could reduce the gastrointestinal dysfunction vs. sufentanil in patients undergoing neurosurgery.