Urgent or emergency endoscopic retrograde cholangiopancreatography (ERCP) is indicated for gallstone-induced acute cholangitis and pancreatitis. The technique and optimal timing of ERCP depend on the disease state, its severity, anatomy, patient background, and the institutional situation. Endoscopic transpapillary biliary drainage within 24 h is recommended for moderate to severe acute cholangitis. The clinical outcomes of biliary drainage with nasobiliary drainage tube placement and plastic stent placement are comparable, and the choice is made on a case-by-case basis considering the advantages and disadvantages of each. The addition of endoscopic sphincterotomy (EST) is basically not necessary when performing drainage alone, but single-session stone removal following EST is acceptable in mild to moderate cholangitis cases without antithrombotic therapy or coagulopathy. For gallstone pancreatitis, early ERCP/EST are recommended in cases with impacted gallstones in the papilla. In some cases of gallstone pancreatitis, a gallstone impacted in the papilla has already spontaneously passed into the duodenum, and early ERCP/EST lacks efficacy in such cases, with unfavorable findings of cholangitis or cholestasis. If it is difficult to diagnose the presence of gallstones impacted in the papilla on imaging, endoscopic ultrasonography can be useful in determining the indication for ERCP.