Gentian is a traditional Chinese herb with heat-clearing, damp-drying, inflammation-alleviating and digestion-promoting effects, which is widely used in clinical practice. However, there are many species of gentian. According to the pharmacopoeia, Gentiana manshurica Kitag, Gentiana scabra Bge, Gentiana triflora Pall and Gentianarigescens Franch are included. Therefore, accurately identifying the species of gentian is important in clinical use. In recent years, with the advantages of low cost, convenience, fast analysis and high sensitivity, infrared spectroscopy (IR) has been extensively used in herbal identification. Unlike one-dimensional spectroscopy, a two-dimensional correlation spectrum (2D-COS) can improve the resolution of the spectrum and better highlight the details that are difficult to detect. In addition, the residual neural network (ResNet) is an important breakthrough in convolutional neural networks (CNNs) for significant advantages related to image recognition. Herein, we propose a new method for identifying gentian-related species using 2D-COS combined with ResNet. A total of 173 gentian samples from seven different species are collected in this study. In order to eliminate a large amount of redundant information and improve the efficiency of machine learning, the extracted feature band method was used to optimize the model. Four feature bands were selected from the infrared spectrum, namely 3500–3000 cm−1, 3000–2750 cm−1, 1750–1100 cm−1 and 1100–400 cm−1, respectively. The one-dimensional spectral data were converted into synchronous 2D-COS images, asynchronous 2D-COS images, and integrative 2D-COS images using Matlab (R2022a). The identification strategy for these three 2D-COS images was based on ResNet, which analyzes 2D-COS images based on single feature bands and full bands as well as fused feature bands. According to the results, (1) compared with the other two 2D-COS images, synchronous 2D-COS images are more suitable for the ResNet model, and (2) after extracting a single feature band 1750–1100 cm−1 to optimize ResNet, the model has the best convergence performance, the accuracy of training, test and external validation is 1 and the loss value is only 0.155. In summary, 2D-COS combined with ResNet is an effective and accurate method to identify gentian-related species.