BackgroundHydration is currently the main measure to prevent contrast-induced nephropathy (CIN). We aimed to compare the preventive effect of preprocedure and postprocedure hydration on CIN in patients with coronary heart disease undergoing elective percutaneous coronary intervention (PCI).MethodsA retrospective study included 198 cases of postprocedure hydration and 396 cases of preprocedure hydration using propensity score matching. The incidence of CIN 48 h after PCI and adverse events within 30 days after contrast media exposure were compared between the two groups. Logistic regression analysis was used to analyse the risk factors for CIN.ResultsThe incidence of CIN in the postprocedure hydration group was 3.54%, while that in the preprocedure hydration group was 4.8%. There was no significant difference between the two groups (p= 0.478). Multivariate logistic regression analysis showed that diabetes mellitus, baseline BNP and cystatin C levels, and contrast agent dosage were independent risk factors for CIN. There was no significant difference in the incidence of major adverse events between the two groups (3.03% vs. 2.02%,p= 0.830).ConclusionsPostprocedure hydration is equally effective compared to preoperative hydration in the prevention of CIN in patients with coronary heart disease undergoing elective PCI.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12872-023-03358-w.