Rectal indomethacin and diclofenac are promising drugs for prevention of post‐endoscopic retrograde cholangiopancreatography (ERCP) pancreatitis (PEP). However, their prophylactic effect on PEP in average‐risk patients remains controversial. We performed a systematic review and meta‐analysis to assess the efficacy and safety of rectal indomethacin and diclofenac in average‐risk patients, and to indirectly compare the prophylactic effect of the two drugs. A comprehensive search of the PubMed, EMBASE, and Cochrane Library databases was performed to identify randomized controlled trials (RCTs) on rectal indomethacin or diclofenac for prophylaxis against PEP. Fixed‐ and random‐effects models weighted by the Mantel–Haenszel method were used for direct comparisons. The adjusted indirect treatment comparison method was used to indirectly compare the efficacy of indomethacin and diclofenac. A total of 10 RCTs, including 2928 patients, met our inclusion criteria. No significant publication bias was identified. Pooled estimates showed that rectal indomethacin and diclofenac were associated with a significant reduction in the overall risk of PEP compared with control intervention [relative risk (RR) = 0.62; 95% confidence interval (CI): 0.46–0.83] in average‐risk patients. Subgroup analyses showed that both rectal indomethacin (RR = 0.67; 95% CI: 0.49–0.94) and diclofenac (RR = 0.42; 95% CI: 0.23–0.75) were effective in the prevention of PEP. Indirect comparison showed no significant difference between the effectiveness of the two drugs in the prevention of PEP (RR = 1.607; 95% CI: 0.824–3.136). The updated meta‐analysis suggests that both drugs provide equivalent protection against PEP in average‐risk patients.