Objective:To investigate the preventive effect of indomethacin combined with octreotide on pancreatitis and hyperamylasemia after endoscopic retrograde cholangiopancreatography(ERCP).Methods:Eighty patients treated with ERCP in our hospital between January 2020 and December 2022 were randomly divided into two groups,with 40 patients in each group.The control group began intravenous infusion of octreotide 1 h before the operation for 1 d at 1 mg/(kg·h).The observation group was given indomethacin 0.5 h after operation on the basis of the control group,and one suppository was taken and stuffed in the anus.Both groups were treated with rehydration and anti-infection after surgery.The clinical indices,postoperative pain,and complications of the two groups were compared,and the drug safety of the two groups was observed.Results:There were no significant differences in serum amylase,C-reactive protein(CRP),or pain scores between the two groups(P>0.05).The serum amylase and CRP levels and pain scores in the observation group were lower than those in the control group(P<0.05).The incidence of pancreatitis and hyperamylasemia in the observation group was lower than that in the control group(P<0.05).No obvious adverse reactions were observed in either group.Conclusion:Indomethacin combined with octreotide is an effective preventive measure that can reduce the levels of serum amylase and CRP after surgery,relieve pain,and reduce the risk of pancreatitis and hyperamylasaemia.