With the increasing cost of acquiring new users for e-commerce enterprises, it has become an important task for e-commerce enterprises to actively carry out customer churn management. Therefore, based on the distributed gradient enhancement library algorithm (XGBoost), this research proposes a big data analysis study on e-commerce customer churn. First, it conducts an evaluation analysis on e-commerce customer segmentation and combines the random forest algorithm (RF) to build an RF XGBoost prediction model based on customer churn. Finally, it verifies the performance of the prediction model. The results show that the area under receiver operating characteristic curve (AUC) value, prediction accuracy, recall rate, and F1 value of the RF-XGBoost model are significantly better than those of the RF, XGBoost, and ID3 decision trees to build an e-commerce customer churn prediction model; The average output error of RF-XGBoost model is 0.42, and the average output error is relatively good, indicating that the model proposed in this study has a smaller error and higher accuracy. It can make a general assessment of the customer churn of e-commerce enterprises, and then provide data support for the customer maintenance work of e-commerce enterprises. It is helpful to analyze the relevant factors affecting customer churn, to Equationte targeted customer service programs, thus improving the economic benefits of e-commerce enterprises.