We have few population-level data on the performance of endoscopic retrograde cholangiopancreatography (ERCP) in the United States. We investigated the numbers of unplanned hospital encounters (UHEs), patient and facility factors associated with UHEs, and variation in quality and outcomes in the performance of ERCP in 3 large American states.