To evaluate the effect of Modified Dachengqi Decoction Soup on retention of gastrointestinal motility in patients with hepatobiliary surgery after an enema. 100 patients with hepatobiliary surgery were randomly divided into group A and group B (n = 50). A group of postoperative parenteral nutrition, fasting and gastrointestinal decompression and other conventional treatment, B group on the basis of group A plus Modified Dachengqi Soup retention enema, compared the two groups of gastrointestinal motility. The time of first exhaust, abdominal distension disappeared and bowel sounds recovered in group B was significantly shorter than that in group A, which was statistically significant (P <0.05). There was no significant difference between the two groups (P > 0.05). The levels of motilin in group B were significantly higher than those in group A at 2 days after the operation, and there was a significant difference between group A and group B, P < 0.05. The patients with hepatobiliary surgery can not only promote the recovery of the postoperative organs, but also can significantly improve the level of motilin in the body, and thus improve the patient’s gastrointestinal motility.