This study was aimed at exploring the application value of magnetic resonance imaging (MRI) based on image enhancement algorithm in analyzing the placement of drainage tubes in the healing of incisions after hepatobiliary surgery. A total of 70 patients with liver cancer undergoing laparoscopic hepatobiliary surgery were selected, including 34 males and 36 females. According to the detection method of postoperative recovery, they were divided into a group A (conventional MRI detection) and a group B (MRI detection based on Retinex algorithm). Patients were divided into two groups according to whether subcutaneous drainage tubes were placed: group C (no subcutaneous drainage tubes were placed) and group D (subcutaneous drainage tubes were placed), with 35 patients in each group. The results showed that there was no significant difference between group A and group B in tumor residual or recurrence. The detection rate of tumor capsule in group B was significantly higher than that in group A (
P
<
0.05
). The sensitivity, specificity, and accuracy of group A for the detection of recurrent lesions were 63.40%, 86.90%, and 78.60%, respectively; those in group B were 82.70%, 98.50%, and 93.20%, respectively. Therefore, the difference between the two groups was statistically significant (
P
<
0.05
). The incidence of poor wound healing and infection in group C were significantly lower than those in group D (
P
<
0.05
). Therefore, the effect of MRI detection based on image enhancement algorithm was more conducive to the evaluation of postoperative recovery due to the traditional MRI detection. In addition, the drainage tube was helpful to the postoperative wound healing and showed high clinical value.