The varieties of soil and native eggs relate to its internal quality and sales price. Identifying the egg types quickly and nondestructively will be of great significance to regulate the market of agricultural products. The visible/nearinfrared spectrum technology was used to extract the spectral transmittance (500-900 nm) of free-range and ordinary of the same egg variety collected from different breeding environment of Hubei Province. The spectral data were pretreated by the standard normal variate (SNV).The competitive adaptive reweighed sampling(CARS) combined with the principal components analysis(PCA) method was used to perform two times dimensionality reduction of spectral data. The processed data were transmitted as the input of boosting regression trees(BRT) and established the model for identifying egg varieties. The correct rate of the model set and the prediction set are 98.33% and 97.00%. The results showed that applying visiblenear infrared spectrum based on boosting regression trees to identify eggs with the same hen breeds but different feeds is feasible.