Under the diversified work environment, the relationship between employees and enterprises has ushered in new and significant changes. How to adapt to changes, form a new human resource management model, and improve management performance is an urgent issue. In this paper, we constructed an employee turnover pre-analysis measurement model based on XGBoost artificial intelligence, iterated many times during training, generated a weak classifier in each iteration, trained on the basis of the residuals of the previous classifier, and finally combined all the weak classifiers in a weighted way, reduced the bias to improve the accuracy of the final classifier through continuous iteration, and completed the construction of the model. The historical data of employees in six branches of enterprise W are imported into the model for analysis, and the F1 values are all above 0.85, and the AUCs are all higher than 0.7, with good prediction performance. The top three important employee turnover influencing characteristics and their weights are overtime work 0.647, monthly income 0.618, and interpersonal relationship 0.579. Accordingly, human resource management optimization strategies are designed and applied in Enterprise W to implement human resource management reform. After the reform, the average monthly separation rate has been reduced from 2.23% to 0.19%, and the average number of monthly separations has been reduced to only 7, which is 91.86% lower than during the pre-reform period. This study proposes feasible paths for modern information technology and artificial intelligence-enabled human resource management, and optimization of human resource management in a diverse work environment.