Acute kidney injury (AKI) is a common complication after cardiopulmonary bypass (CPB) for cardiac surgery, and there is no effective treatment. This study was aimed at constructing an early warning model of AKI after CPB in adults and investigating the performance of this model. Patients who underwent CPB in the Department of Cardiac Surgery, Shanghai Tenth People’s Hospital, from January 2018 to December 2019 were recruited into the present study. Blood and urine samples were collected preoperatively (0 h) and 2 h, 6 h, 12 h, 24 h, and 48 h after surgery, and the creatinine and activating transcription factor 3 (ATF3) were detected. According to the diagnostic criteria of AKI, patients were divided into the AKI group and the non-AKI group, and the risk factors for AKI after CPB were screened. The receiver operating characteristic (ROC) curve analysis was used to identify the optimal biomarkers for the establishment of early warning model of AKI after CPB. Finally, the performance of this model was further verified. A total of 83 patients were included in this study, 42 of whom developed AKI after surgery. After CPB, the serum and urine levels of creatinine and ATF3 increased to different degrees, and the increase in urine ATF3 was the most obvious in the AKI group. The area under ROC (AUC) of urine ATF3 at 12 h after surgery was 0.691 (95% CI: 0.576-0.807). When ATF3 was higher than 1216 pg/mL, the sensitivity and specificity of ATF3 in the diagnosis of AKI were 0.43 and 0.85, respectively. The height, conjugated bilirubin on the surgery day, urine ATF3 12 h after surgery, and serum creatinine 24 h after surgery were independent risk factors for postoperative AKI. Urine ATF3 and other factors were used to establish AKI warning model after CPB, which showed good fitting and accuracy. In conclusion, ATF3 is an early biomarker of post-CPB AKI. Addition of urine ATF3 to AKI risk factors can improve the accuracy of early AKI prediction.