Autoimmune pancreatitis (AIP) is characterized by enlargement of the pancreas and irregular narrowing of the main pancreatic duct. It is often associated with IgG4-related sclerosing cholangitis (IgG4-SC), in which the bile duct narrows. Although characteristic irregular narrowing of the pancreatic duct caused by endoscopic retrograde cholangiopancreatography is noted in AIP, it is difficult to differentiate between localized AIP and pancreatic carcinoma based on imaging of the pancreatic duct. While stenosis of the bile duct in IgG4-SC is characterized by longer-length stenosis than in cholangiocarcinoma, differentiation based on bile duct imaging alone is challenging. Endoscopic ultrasound (EUS) can characterize hypoechoic enlargement of the pancreas or bile duct wall thickening in AIP and IgG4-SC, and diagnosis using elastography and contrast-enhanced EUS are being evaluated. The utility of EUS-guided fine needle aspiration for the histological diagnosis of AIP has been reported and is expected to improve diagnostic performance for AIP. Findings in the bile duct wall from endoscopic retrograde cholangiopancreatography followed by intraductal ultrasonography are useful in differentiating IgG4-SC from cholangiocarcinoma. Diagnoses based on endoscopic ultrasonography play a central role in the diagnosis of AIP.