The invention provides a method for identifying ginsengs with different growth patterns by using a near infrared spectrum technology and determining the content of components in the ginsengs, relates to the qualitative discrimination among garden ginsengs and retirement mountain ginsengs, among the retirement mountain ginsengs and wild ginsengs, and among the garden ginsengs, the retirement mountain ginsengs and the wild ginsengs, and quantitative analysis of ginseng total saponins (the sum of nine saponins) and the water, and belongs to the technical field of traditional Chinese medicinal materials. According to the method, a near-infrared spectroscopy is used for carrying out spectrum collection on a sample; then a principal component analysis-mahalanobis distance method is used for respectively establishing a judgment model to carry out qualitative analysis; and a partial least squares regression method is used for respectively establishing a regression model to carry out the qualitative analysis. The method does not need to separate the sample and can directly judge the variety and the growing manner of the detected sample, and the content of the total saponins and the water in a lossless and rapid manner by not losing original characters and compatibility. Therefore, the method can be widely applied to the rapid, simple and convenient qualitative and quantitative analysis of traditional Chinese medicinal materials.