BackgroundWith the constant need for technique improvement for ensuring correct diagnoses and precise treatment, imaging examinations that use contrast media have become unavoidable and indispensable. However, the long-term effects of contrast media on renal function remain unclear in populations with advanced renal failure. This study aimed to examine the relationship between contrast media exposure and long-term trends in renal function in patients with renal failure.MethodsThis retrospective cohort study included patients with a definitive diagnosis of chronic kidney disease who visited medical institutions in Japan between April 2012 and December 2020. The cohort was divided into contrast agent therapy and non-contrast agent therapy groups. The assessment indices were the number of contrast exposures and renal function decline. Renal function decline was calculated based on observed chronic kidney disease stage trends and glomerular filtration rate correspondence tables sourced from various guidelines. A stratified analysis focusing on changes in renal function while accounting for the acceleration of chronic kidney disease progression was also performed.ResultsAfter adjusting for patient background with propensity score matching, 333 patients each were included in both groups. The observation period was 5.3 ± 2.1 and 4.9 ± 2.2 years per case in the contrast-enhanced and non-contrast-enhanced groups, respectively. The baseline estimated glomerular filtration rate at the beginning of the observation period was 55.2 ± 17.8 mL/min/1.73 m2in the contrast-enhanced groups (P= 0.65). Although only slightly different in both groups, the glomerular filtration rate change was 1.1 ± 3.3 mL/min/1.73 m2/year in the contrast agent therapy group and tended to be higher with contrast media exposure. Stratified analysis showed that the annual glomerular filtration rate changes in patients with more contrast media exposures and altered renal function were 7.9 ± 7.1 mL/min/1.73 m2/year and 4.7 ± 3.6 mL/min/1.73 m2/year in the contrast agent therapy and non-contrast agent therapy groups, respectively (1.69 times,P< 0.05).ConclusionWe were able to identify a clinical trend of successful measures for preventing adverse renal outcomes associated with contrast media exposure. However, increased frequency of contrast media exposure has a long-term effect on renal function in patients with altered it. Appropriate treatment choices related to contrast media may control chronic kidney disease.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12882-023-03194-2.