A 70-year-old man was referred to our department for the treatment of early gastric cancer. Contrast-enhanced computed tomography (CT) incidentally showed diffuse enlargement of the pancreas with a capsule-like rim, and blood tests showed elevated serum IgG4 levels, leading to a diagnosis of autoimmune pancreatitis (AIP). Endoscopic treatment for gastric cancer was performed, and pathological findings showed adenocarcinoma with abundant IgG4-positive plasma cell infiltration. Thereafter, the serum IgG4 levels normalized, and the findings of AIP disappeared on CT without steroid treatment. These findings suggest that the gastric cancer activated an IgG4-related immune response, resulting in the development of AIP.