The traceability of geographic origin is essential for guaranteeing the quality, safety, and protection of oyster brands. However, the current outcomes of traceability lack credibility as they do not adequately explain the model's predictions. Consequently, we conducted a study to evaluate the efficacy of utilizing explainable machine learning combined with mineral elements analysis. The study findings revealed that 18 elements have the ability to determine regional orientation. Simultaneously, individuals should pay closer attention to the potential risks associated with oyster consumption due to the regional differences in essential and toxic elements they contain. Light gradient boosting machine (LightGBM) model exhibited indistinguishable performance, achieving flawless accuracy, precision, recall, F1 score and AUC, with values of 96.77%, 96.43%, 98.53%, 97.32% and 0.998, respectively. The SHapley Additive exPlanations (SHAP) method was used to evaluate the output of the LightGBM model, revealing differences in feature interactions among oysters from different provinces. Specifically, the features Na, Zn, V, Mg, and K were found to have a significant impact on the predictive process of the model. Consistent with existing research, the use of explainable machine learning techniques can provide insights into the complex connections between important product attributes and relevant geographical information.