To realize the non-destructive and rapid origin discrimination of Poria cocos in batches, this study established the P. cocos origin recognition model based on hyperspectral imaging combined with machine learning. P. cocos samples from Anhui, Fujian, Guangxi, Hubei, Hunan, Henan and Yunnan were used as the research objects. Hyperspectral data were collected in the visible and near infrared band(V-band, 410-990 nm) and shortwave infrared band(S-band, 950-2 500 nm). The original spectral data were divided into S-band, V-band and full-band. With the original data(RD) of different bands, multiplicative scatter correction(MSC), standard normal variation(SNV), S-G smoothing(SGS), first derivative(FD), second derivative(SD) and other pretreatments were carried out. Then the data were classified according to three different types of producing areas: province, county and batch. The origin identification model was established by partial least squares discriminant analysis(PLS-DA) and linear support vector machine(LinearSVC). Finally, confusion matrix was employed to evaluate the optimal model, with F1 score as the evaluation standard. The results revealed that the origin identification model established by FD combined with LinearSVC had the highest prediction accuracy in full-band range classified by province, V-band range by county and full-band range by batch, which were 99.28%, 98.55% and 97.45%, respectively, and the overall F1 scores of these three models were 99.16%, 98.59% and 97.58%, respectively, indicating excellent performance of these models. Therefore, hyperspectral imaging combined with LinearSVC can realize the non-destructive, accurate and rapid identification of P. cocos from different producing areas in batches, which is conducive to the directional research and production of P. cocos.