Due to the fierce competition in the market, customers are often faced with multiple choices when choosing products and services. So many industries, including banking, are now facing the problem of how to address customer churn. At the same time, in order to improve the quality of service for users, banks and other institutions need to conduct in-depth research on the characteristics of customers. This paper provides solutions to the above two problems by using data analysis and mining technology and machine learning technology in artificial intelligence. The study provides an in-depth exploration of cus-tomer churn likelihood by analyzing customer behavior and characteristics. This study used data analysis methods such as Chi-square test, Mann Whitney U test, linear regres-sion, and machine learning methods such as logistic regression, random forest, and XGBoost. This research uses public datasets on Kaggle. This study uses data analysis techniques to provide recommendations on how the banking industry should improve service quality, and establishes 6 models with better performance to predict customer churn. In addition, this paper also uses a variety of evaluation indicators to compare the model performance, and selects the random forest model with high predictive ability as the most suitable model. In addition, the order of importance of the factors responsible for customer churn was successfully derived.