This study aims to leverage laser-induced breakdown spectroscopy (LIBS) and near-infrared spectroscopy (NIR), combined with advanced data processing and fusion methods, to accurately trace the origin of Panax ginseng. Initially, the isolation forest algorithm was applied to remove outliers, ensuring the quality of the dataset. Subsequently, classification models using random forest (RF), support vector machine (SVM), and stochastic gradient descent (SGD) classifier were developed based on the LIBS and NIR spectral data. The performance of these models was optimized through various preprocessing techniques and variable selection methods. The results indicated that the standard normal variate (SNV) combined with sequential forward selection (SFS) and the SVM model performed best with LIBS data, while the second derivative (2nd Der) combined with multiple scattering correction (MSC), least absolute shrinkage and selection operator (LASSO), and the RF model was most effective for NIR data. In terms of data fusion, this study compared different fusion models and found that the ensemble learning-based fusion model outperformed the outer product fusion model, which in turn exceeded the performance of the mid-level data fusion model. Ultimately, the ensemble learning-based fusion model achieved a prediction accuracy of 99.0% on the independent prediction set, with a Kappa value of 0.982, an F1 score of 0.990, and a Brier score of 0.009. Furthermore, an analysis of elemental importance revealed that Fe, Mg, Na, and Ca were the most significant elements for distinguishing Panax ginseng from different origins, with O, Cu, Al, K, Mn, Ba, and Cl also being important. In conclusion, this study proposes an effective data fusion method combining LIBS and NIR, which not only achieves high traceability accuracy but also provides a theoretical foundation and technical support for quality control and traceability in food and agricultural products.