This study examines the improvement of prediction accuracy for Chronic Kidney Disease (CKD) through the integration of the K-Nearest Neighbors (KNN) method with Particle Swarm Optimization (PSO). Amidst the rising prevalence of CKD, closely related to diabetes and hypertension, early detection of CKD becomes a significant challenge, especially in Indonesia where access to healthcare facilities and public awareness remain limited. This study utilizes the Chronic Kidney Disease dataset from the UCI Machine Learning repository, encompassing 400 patient records with 24 clinical, laboratory, and demographic variables. With the KNN method, this approach classifies data based on feature proximity, while PSO is used for feature selection and parameter optimization, enhancing the model's accuracy and efficiency in identifying CKD at early stages. The findings indicate a significant improvement in prediction accuracy, from 80.00% using KNN to 97.75% after integration with PSO. These results affirm that the combined approach of KNN and PSO holds great potential in improving early detection and management of CKD, paving the way for further research into practical applications in the healthcare field.