Organ/space surgical site infections (OSSI) after pancreaticoduodenectomy (PD) are not rare events. The role of diagnosis and treatment for pancreatic and biliary diseases with an endoscopic retrograde cholangio-pancreatography (ERCP) procedure is currently controversial. However, the ERCP procedure might play a role in surgical outcomes after PD. We conducted a retrospective cohort study for patients who underwent PD in the First Affiliated Hospital with the Nanjing Medical University from 1st September 2012 to 31st January 2018. The relationship between ERCP exposure and OSSI after PD was analyzed by univariate and forward stepwise multivariate logistic regression model. Of the 1,365 patients who underwent PD, 136 developed OSSI (10.0%). We found that ERCP exposure before PD (EEBPD) was significantly associated with an increased incidence rate of post-operative pancreas fistula (POPF) [24.2% (23/95) vs. 14.9% (189/1,270), risk ratio (RR) =1.63, 95% confidence interval (CI), 1.11-2.38, P=0.015]. Hypertension, a higher level of preoperative low-density lipoprotein (LDL) and creatinine (Cr) were associated with elevated risks of post-operative OSSI [adjusted odds ratio (Adj-OR) (95% CI) were 1.59 (1.09-2.32), 1.70 (1.16-2.51), 1.99 (1.36-2.92)], whereas a preoperatively higher level of aspartate aminotransferase (AST) would decrease the risk [Adj-OR (95% CI), 0.62 (0.42-0.91)]. Remarkably, EEBPD would significantly increase and more than double the OSSI risk [Adj-OR (95% CI), 2.56 (1.46-4.47)] especially if it was within 14 days before surgery (Spearman =-0.698, P<0.001). ERCP, as an independent risk factor, significantly increased the risk of post-operative OSSI after PD if it is performed within 14 days prior to surgery. Our findings would assist clinical decision-making, and improve OSSI control and prevention.