Gas chromatography (GC) and chemometrics were applied to classify the geographical origins of black peppers (Piper nigrum L.) from Vietnam, Brazil, Indonesia, and India; which are the most important black pepper producers in the world. A gas chromatograph with a flame ionization detector (FID) profiled the black pepper extracts. A polynomial fitting baseline correction and data transformation by different numerical roots were introduced for data preprocessing. Partial least-squares discriminant analysis (PLS-DA) was used to build classification models. The classification rates of PLS-DA obtained with a leave-one-sample-out validation were used to optimize the polynomial order for the baseline correction and the degree of the root transformation. The polynomial order baseline correction and root transformation methods significantly improved the performance of PLS-DA which resulted in improved classification rates up to 100%. Therefore, a GC method coupled with chemometric analysis was devised for determination of the growing location of black pepper.