Unsafe driving behaviors are the leading causes of truck crashes. Therefore, an enhanced understanding of truck drivers' unsafe driving behaviors is of considerable significance for preventing truck crashes. However, previous studies have rarely encompassed proactive factors such as safety management. Therefore, a classification framework for truck drivers' unsafe driving behaviors was established according to a survey of 2000 truck drivers using four machine learning models (CART, RT, AdaBoost, and GBDT). The classification framework included six first-level input dimensions, 51 s-level input indicators, covering both objective and proactive factors. Nine types of unsafe driving behaviors were determined as outputs. Unique risk factors associated with each of nine unsafe driving behaviors were identified. The results showed that the model's predictive performance varies with different driving behaviors (Classification Accuracy ranges from 0.64 to 0.95, F1-score ranges from 0.52 to 0.72), which was caused by different formation mechanisms of different driving behaviors. Similarly, the results related to factor importance for different driving behaviors were also significantly different, regardless of the first-level and second-level factors. Furthermore, the correlation analysis and OR value strengthened the interpretability of the factor importance, revealing possible reasons for the differences between various driving behaviors.