Headspace solid-phase microextraction (HS-SPME) combined with gas chromatography–mass (GC–MS) is the most often used technique for the analysis of volatile organic compounds (VOCs). When coupled with machine-learning algorithms, the two provide the means to differentiate the volatile metabolome of foods from different origins. In this study, the volatile metabolites of winter jujube, a fruit protected by China and the European Union (EU) based on geographical indications (GI), was analyzed by HS-SPME–GC–MS. Extreme gradient boosting (XGBoost) was applied, for the first time, to evaluate differences in winter jujube grown in four distinct regions. Locational differences yielded 33 VOCs that differed by functionality and concentration with a recurrence probability of ≥ 60%. Zhanhua winter jujube contained the most abundant VOCs, with Yuncheng winter jujube the least. The 33 winter jujube VOCs were analyzed by random forest (RF), support vector machine (SVM), and XGBoost to identify the place of origin. The discrimination rates were about 85% using RF, about 93% using SVM, and about 98% with XGBoost. Compared to RF and SVM algorithms, XGBoost was more efficient, producing higher accuracy rates, and providing new opportunities for origin traceability.