IntroductionEndoscopic retrograde cholangiopancreatography (ERCP) is considered to be a challenge in patients with surgically altered anatomy. We aimed to identify the risk factors of ERCP-related adverse events in patients with surgically altered anatomy in our center.MethodsWe included patients with surgically altered anatomy who underwent ERCP between April 2017 and December 2020 at our center. Clinical characteristics and outcomes were analyzed in univariate and multivariate methods to identify the risk factors for adverse events.ResultsA total of 121 ERCP procedures were performed in 93 patients. The papilla or surgical anastomosis was successfully reached in 113 cases (93.4%). Diagnostic success was achieved in 106 cases (93.8%) and subsequent therapeutic success was achieved in 102 cases (96.2%). ERCP-related adverse events occurred in 31 cases (25.6%). In univariate analysis, not first time ERCP attempt, a CBD stone diameter ≥ 15 mm, multiple cannulation attempts, endoscopic papillary balloon dilation, endoscopic papillary large balloon dilation, endoscopic retrograde biliary drainage, biopsy in the bile duct or papilla, mechanical lithotripsy use, and stone retrieval basket were associated with ERCP-related adverse events. In multivariate analysis, multiple cannulation attempts (OR 5.283; 95% CI 1.088–25.659; p = 0.039), endoscopic papillary balloon dilation (OR 4.381; 95% CI 1.191–16.114; p = 0.026), and biopsy in the bile duct or papilla (OR 35.432; 95% CI 2.693–466.104; p = 0.007) were independently associated with ERCP-related adverse events.ConclusionsERCP in patients with surgically altered anatomy was feasible and safe. Interventions including multiple cannulation attempts, endoscopic papillary balloon dilation, and biopsy in the bile duct or papilla were independent risk factors for ERCP-related adverse events.