Objective: The high incidence of abnormal serum potassium in patients with chronic kidney disease have resulted in frequent cardiovascular adverse events and even death. Through a retrospective analysis of the clinical data of 273 patients with CKD, we analyzed the correlation between the general data of patients and serum potassium levels, and the risk factors for abnormal serum potassium, and constructed risk prediction models for abnormal serum potassium. Methods: In this paper, 273 patients with CKD who were admitted to the Second Affiliated Hospital of Xuzhou Medical University were selected for this retrospective analysis. The subjects were divided into two groups based on the presence of abnormal serum potassium. Preliminary literature retrieval was conducted to extract the risk factors that might affect serum potassium. Independent sample t test was used to analyze the differences between two groups, Pearson or Spearman test was used to analyze the linear correlation of data, and Logistic regression equation was used to construct the multiple regression analysis. Results: The use of diuretics ( P =0.046), the use of renin-angiotensin and aldosterone (RAAS) inhibitors ( P =0.040) and low score of Renal Adherence Questionnaire (RAAQ) ( P < 0.001) were independent risk factors for abnormal serum potassium. There was a positive linear correlation between serum potassium and age, serum creatinine, blood urea nitrogen, anion gap and RAAQ score in patients with CKD; each influencing factor was independent. Subgroup analysis showed that the use of diuretics, low RAAQ score and peritoneal dialysis were more likely to lead to hypokalemia, while hypertension, diabetes, use of RAAS inhibitors, low RAAQ score and hemodialysis were more likely to result in hyperkalemia. Conclusion: Poor compliance is a risk factor for abnormal serum potassium. On this basis, the use of diuretics and peritoneal dialysis may increase the risk of hypokalemia, and the use of RAAS, hypertension, diabetes, and peritoneal dialysis may increase the risk of hyperkalemia.