- Soil available nitrogen is supposed to be an important nutrient constituent for the growth and development of crops. In-situ field visible-near infrared (VIS-NIR, 350~2 500 nm) spectroscopic analysis is a rapid and non-destructive method that has the potential to predict nitrogen. Further, it is cost-effective method compared with traditional laboratory analysis and can be used to provide a database for the development of real-time soil nutrient sensors. However, prediction accuracy was greatly reduced due to unexpected environmental factors under field condition. In the current research, field work contained 76 samples from two sites located in the center and north parts of Israel. Y-gradient general least squares weighting (Y-GLSW) algorithm was investigated to filtering correct the field VIS-NIR spectra for improving the prediction ability of nitrogen. Firstly, Savitzky-Golay (SG) smoothing algorithm, first derivative transformation and standard normal variate were sequentially conducted to preprocess and transform the raw field spectra (RS). Then, a filtering model was established based on the Y-GLSW algorithm to correct the preprocessed and transformed spectra (PPT). After that, partial least square - regression (PLS-R) algorithm was applied to build regression models with RS, PPT, and Y-GLSW corrected spectra, respectively. As a result, the regression model based on RS was proved to be unfeasible. The ratio of performance to deviation (RPD) and the ratio between interpretable sum squared deviation and real sum squared deviation (SSR/SST) of the test set of the PPT-based regression model were found to be 1.41 and 0.57, respectively. The results of Y-GLSW-based regression model were RPD = 2.07 and SSR/SST=0.69 that significantly increased by 46.81% and 21.05% compared with PPT-based regression model. The results indicated that Y-GLSW was suitable to remove some unexpected variations (like the effect of environmental factors) of field spectra and improved the prediction accuracy and explanation ability of PLS-R model for predicting nitrogen.