The authentication and identification of different edible oils have become a focus of attention in food safety field. In this work, we propose a method for distinction of edible oils by using terahertz (THz) spectrum combined with genetic algorithm (GA) and partial least squares discriminant analysis (PLS-DA). To evaluate the robustness of the model, we also employ full spectra PLS (fsPLS), interval PLS (iPLS), and backward interval (biPLS) algorithms to verify the classification performance through a variable selection. The results demonstrate that the GA-PLS-DA model has a smaller root mean square error of prediction (RESEP), a larger correlation coefficient of prediction (Rp), and higher classification accuracy than other models. In conclusion, the THz spectrum coupled with chemometrics is an effective method for differentiating various types of edible oil.