Currently, competition within the service sector is intensifying rapidly. Acquiring new customers is becoming increasingly costly for banks compared to retaining existing ones. Consequently, it becomes imperative to forecast customer attrition in banks. This paper presents a method to predict customer churn in banks using machine learning. The study explored the possibility of customer churn in banks through a dataset of customer information on Kaggle. This study uses four kinds of machine learning such as ANN, Random Forest, Decision tree and Logistic regression. And the correlation analysis of the data set is carried out. Finally, the ROC curves of four kinds of machine learning were compared to get the model with the highest accuracy. Therefore, the accuracy of ANN is higher than that of the other three models. Then the importance is analyzed, and the most important feature of this experiment is the number of banking products owned by customers.