Soil nitrogen and phosphorus are directly related to soil quality and vegetation growth and are, therefore, a common research topic in studies on global climate change, material cycling, and information exchange in terrestrial ecosystems. However, collecting soil hyperspectral data under in situ conditions and predicting soil properties, which can effectively save time, manpower, material resources, and financial costs, have been generally undervalued. Recent optimization techniques have, however, addressed several of the limitations previously restricting this technique. In this study, hyperspectral data were taken from surface soils under different vegetation types in the wetlands of the Shaanxi Yellow River Wetland Provincial Nature Reserve. Through in situ original and first-order differential transformation spectral data, three prediction models for soil carbon, nitrogen, and phosphorus contents were established: partial least squares (PLSR), random forest (RF), and Gaussian process regression (GPR). The R2 and RMSR of the constructed models were then compared to select the optimal model for evaluating soil content. The soil organic carbon, total nitrogen, and total phosphorus content models established based on the first-order differential had a higher accuracy when modeling and during model validation than those of other models. Moreover, the PLSR model based on the original spectrum and the Gaussian process regression model had a superior inversion performance. These results provide solid theoretical and technical support for developing the optimal model for the quantitative inversion of wetland surface soil carbon, nitrogen, and phosphorus based on in situ hyperspectral technology.