Background: Previous studies have shown that chronic kidney disease(CKD) affected the long-term prognosis of patients underwent the elective percutaneous coronary intervention(EPCI). However, the prognostic impact in patients with the development of the contrast-associated acute kidney injury(CA-AKI) and recovery or progression of CA-AKI were controversial. For the moment, little attention has been paid to the relationship between the dynamic evolution of renal function and its prognosis. Methods: We used three stages to characterize the dynamic evolution of renal function, namely the occurrence of CKD at baseline, the occurrence of CA-AKI in the postoperative period and the occurrence of post kindey injury(PKI) at 3 - 6 months postoperatively. Cardiac death and all-cause mortality were used as the endpoint of the study. PKI(+) was defined as CA-AKI not recovered or an increase in absolute serum creatinine (SCr) {greater than or equal to}0.3 mg/dl or a SCr relative increase in creatinine {greater than or equal to} 50% after 3 - 6 months. PKI(-) was defined as CA-AKI recovered or SCr elevation not meeting the PKI(+) requirement. Results: We prospectively enrolled 2951 patients who underwent EPCI from 2012 to 2018. They were divided into three groups according to baseline CKD and CA-AKI: STAGE I[Unimpaired renal function group, CKD(-)/CA-AKI(-) (n=1247)], STAGE II[Partially impaired renal function group, IIa: CKD(-)/CA-AKI(+) (n=91) and IIb: CKD(+)/CA-AKI(-) (n=1472)] and STAGE III[severely impaired renal function group, CKD(+)/CA-AKI(+) (n=141)]. Subsequently, based on the occurrence of PKI, they were divided into six groups: STAGE I/PKI(-) (n=1212), STAGE I/PKI(+) (n=35), STAGE II/PKI(-) (n=1508), STAGE II/PKI(+) (n=55), STAGE III/PKI(-) (n=108), STAGE III/PKI(+) (n=33). In a mean follow-up period of 3.33{plus minus} 1.39 years, we found that from STAGE I, STAGE II to STAGE III at baseline groups, the incidence of the primary outcome significantly increased. Meanwhile, from the baseline groups to the follow-up groups, the dynamic changes in renal function were observed. At the follow-uo groups, the occurrence of PKI did not affect the prognosis of patients in the STAGE I group(hazard ratio [HR] = 0.94, 95%CI: 0.15-8.11, p = 0.949) and the STAGE III group(hazard ratio [HR] = 1.19, 95%CI: 0.50-2.83 p = 0.689). However, for the STAGE II group (hazard ratio [HR] = 2.65, 95%CI: 1.42-4.94, p = 0.002), the development of PKI would lead to a poor prognosis for patients. Conclusion: In patients undergoing EPCI, the occurrence of CKD and CA-AKI affected the long-term prognosis of patients. The prognostic impact of the occurrence of PKI depended on the renal function of patients. In patients with unimpaired renal function or severely impaired renal function, the prognostic impact of PKI was negligible. However, in patients with partially impaired renal function, avoidance of PKI could beneficial for their long-term prognosis.