In the human body, the kidneys, play the important role of filtering wastes and toxic bodies from the blood. Chronic kidney disease (CKD) is a condition in which the human kidneys are damaged and unable to filter the blood in a proper way. It is a nontransmissible disease that causes mortality of large numbers worldwide and is very expensive to properly detect and diagnose, therefore, CKD patients often reach its chronic stages, especially in countries with limited resources. Furthermore, CKD is a silent killer due to the lack of physical symptoms at the initial stage, but a steady loss of glomerular filtration rate (GFR) occurs over a period longer than three months. CKD is a fatal disease if left undetected as it leads to renal failure, in the worst cases. However, the early diagnosis of CDK can significantly reduce the mortality rate. Moreover, if CKD is predicted early and correctly, it results in an increased probability of successful treatment and prolongs the patient’s life. The advances in ML, in addition to predictive analytics, provide promising results which in turn prove the capability of prediction in CKD and beyond. The utilization of ML methods in nephrology enables the building of ML models to better detect the at-risk patients of CKD especially in primary care settings. The current study carries out a prediction-based method that helps in early detecting of CKD patients at the early stage. In this study, we utilize on of the boosting method, XGBoost to achieve a higher prediction accuracy for CKD. Various preprocessing steps are employed to achieve better prediction performance, along with suitable hyperparameter tuning and feature selection. We assessed the degree of importance of each feature in the dataset leading to CKD. The performance of the model was evaluated with accuracy. It attained 98% accuracy for training and testing sets. The way the research was done leads to the conclusion that recent improvements in machine learning, along with the help of predictive modeling, make for an interesting way to find new solutions that can then be used to test the accuracy of prediction in the field of kidney disease and beyond.