Truck hoisting detection constitutes a key focus in port security, for which no optimal resolution has been identified. To address the issues of high costs, susceptibility to weather conditions, and low accuracy in conventional methods for truck hoisting detection, a non-intrusive detection approach is proposed in this paper. The proposed approach utilizes a mathematical model and an extreme gradient boosting (XGBoost) model. Electrical signals, including voltage and current, collected by Hall sensors are processed by the mathematical model, which augments their physical information. Subsequently, the dataset filtered by the mathematical model is used to train the XGBoost model, enabling the XGBoost model to effectively identify abnormal hoists. Improvements were observed in the performance of the XGBoost model as utilized in this paper. Finally, experiments were conducted at several stations. The overall false positive rate did not exceed 0.7% and no false negatives occurred in the experiments. The experimental results demonstrated the excellent performance of the proposed approach, which can reduce the costs and improve the accuracy of detection in container hoisting.