Employee turnover is a problem that can have significant negative impacts on an enterprise. It not only results in the loss of valuable talent and knowledge but also incurs substantial costs in terms of hiring, onboarding, and training new employees. Therefore, predicting employee intent to quit can be crucial for organizations to take proactive measures to prevent it from happening. Early detection of employee turnover intention will help enterprise develop and enhance core competitiveness. This study aims to predict the employee intension to quit. In the present study, more than 1,400 samples containing 31 features of a company’s employees were collected from Kaggle website as data sets. A two-layer DGNK model was designed with decision tree, gradient boosting, naive bayes and k-nearest neighbor model as the primary classifier and gradient boosting as the secondary classifier to build the predictive model of employee turnover intention. The experimental outcomes show that DGNK model based on two-layer ensemble learning has the best outcome, while naive bayes model has the worst outcome. In conclusion, this study highlights the importance of predicting employee turnover intention as an effective strategy to enhance organizational performance and competitive advantage. Furthermore, the success achieved in the study suggests that machine learning models like DGNK can play a crucial role in achieving this goal.