Snow pears are an important and widespread agricultural product that can relieve respiratory symptoms, constipation, and alcoholism. Lignin content (LC) has a direct and negative role on the fruit texture and taste of snow pears. Here, we studied the effect on the near‐infrared (NIR) spectroscopy determination of the LC in snow pears due to the position at which spectral measurements were obtained. NIR diffuse reflection spectra were collected from nine measurement positions on each sample by a portable NIR spectrometer. Partial least squares regression (PLSR) was used to develop spectrum compensation models of the LC for three local spectrum models, an average spectrum model, and a global spectrum model. The results indicated that the prediction accuracy of the LC was affected by the spectral measurement position. Compared with the local spectrum models and the global spectrum model, the average spectrum model had good prediction results. Next, synergy interval partial least squares, bootstrapping soft shrinkage, competitive adaptive reweighted sampling, genetic algorithm, and an improved variable stability and frequency analysis algorithm (VSFAA) method were used to select the most effective variables to build the PLSR model. The average spectrum calibration model established using the 10 effective variables selected by VSFAA reduced the influence of the variation of the spectral measurement position for LC prediction and achieved more promising results, with the correlation coefficient of calibration and prediction of 0.842 and 0.824, respectively. The root mean square error of cross‐validation and prediction were 0.736 and 0.694, respectively. The overall results showed that the average spectrum model based on the nine spectral measurement positions reduced the sensitivity to the variation of spectral measurement position for predicting the LC and combined the VSFAA variable selection algorithm to improve the accuracy and provide a robust model for prediction of LC in snow pears. Compared with the local spectrum position models and the global spectrum position model, the average spectrum position model combining the nine measurement positions (three stem‐calyx longitudes intersected three latitudes (stem, equator, calyx)) produced good prediction results and reduced the sensitivity to the variation of the spectral measurement position. The effective wavelengths (SNV‐VSFAA‐PLSR)‐average spectrum position model achieved good results, reducing the influence of the variation of the spectral measurement position for LC prediction, and the effective wavelengths selected from the average spectrum position model were helpful for offsetting the influence of the variation of spectral measurement position on the PLSR models based on the spectrum from the equatorial positions alone.