Premium green tea is a high-value agricultural product significantly influenced by its geographical origin, making it susceptible to food fraud. This study utilized nuclear magnetic resonance (NMR) spectroscopy to perform chemical fingerprint analysis on 78 Longjing tea (LJT) samples from both protected designation of origin (PDO) regions (Zhejiang) and non-PDO regions (Sichuan, Guangxi, and Guizhou) in China. Unsupervised algorithms and heatmaps were employed for the visual analysis of the data from PDO and non-PDO teas while exploring the feasibility of linear and nonlinear machine-learning algorithms in discriminating the origin of LJT. The findings revealed that the nonlinear model random forest (92.2%), exhibited superior performance compared to the linear model linear discriminant analysis (85.6%). The random forest model identified 15 key marker metabolites for the geographical origin of LJT, such as kaempferol glycoside, glutamine, and ECG. The results support the conclusion that the integration of NMR with machine-learning classification serves as an effective tool for the quality assessment and origin identification of LJT.