The rapid determination of the water content of vermiculite substrates can promote the efficiency of desert agricultural facilities. The near-infrared spectroscopy protocol developed in this research could be applied to rapidly and quantitatively detect the water content of vermiculite substrates commonly used in desert agricultural facilities. Two different feature extraction algorithms were used to screen characteristic variables. The partial least-squares and multiple linear regression methods were used to establish a relationship model. The multiple linear regression model with feature variables extracted by a successive projection algorithm based on Savitzky–Golay smoothing preprocessing had the best performance, with a prediction-to-deviation ratio of 11.75. The results of this study provide a feasible method for rapidly detecting the moisture content of vermiculite substrates. Highlights Except for MSC preprocessing, other preprocessing algorithms improved the prediction accuracy of the model. The combination of derivative and SG smoothing preprocessing gave full play to their data-improving capability, and the modeling performance was significantly enhanced. Continuous projections, algorithm screening, and competitive adaptive resampling were used to optimize the characteristic variables related to the detection of the water content in the vermiculite matrix. The CARS feature extraction algorithm performed better than SPA scveaned for reducing the amount of data. Except for a small amount of preprocessing, the MLR algorithm provided superior predictions to the PLSR algorithm. Among them, under the conditions of SG smoothing pretreatment and SPA feature extraction, the MLR algorithm had the best modeling and prediction effect.