This study aims to characterize the soil quality of returning farmland to forest (grass) land in the loess region of northern Shaanxi, particularly on its response to the precipitation. Taking Wuqi county, Shaanxi Province as the research area, three precipitation gradients were divided into 370-395, 440-445, and 460-470 mm. Correspondingly, three typical locations were also selected as Wangwazi (370-395 mm), Dajigou (440-445 mm), and Baibao (460-470 mm). A quantitative evaluation was carried out in three precipitation areas, combining with the soil quality index. The comprehensive scores were achieved, including the soil physical structure, water holding capacity, salinity, carbon sink index, and available nutrient index, for the widespread Robinia pseudoacacia, Hippophae rhamnoides, and grassland. An attempt was made to clarify that the soil quality characteristics changed with precipitation gradients after vegetation restoration. The results showed that: 1) Precipitation, vegetation types, and their interaction had significant effects on soil indicators (P<0.05). 2) In the 460-470 mm precipitation area, Robinia pseudoacacia forest (0.829) had the best effect on soil quality improvement, followed by Hippophae rhamnoides forest (0.808). The soil quality of both reached the fertile level, and the difference was not significant. Grassland (0.679) had the lowest soil quality index, and the soil was at a more fertile level. In the 440~445 mm precipitation area, the Hippophae rhamnoides (0.764) had the best comprehensive soil quality indexes, followed by the Robinia pseudoacacia (0.672), both of which reached a relatively fertile level, whereas, the grassland (0.479) had the lowest soil quality index at a medium level. In the 370-395 mm precipitation area, the comprehensive soil quality index of the three vegetation types from large to small was Hippophae rhamnoides forest (0.792), Robinia pseudoacacia forest (0.433), grassland (0.270). The soil quality grade of Hippophae rhamnoides forest was relatively higher. Robinia pseudoacacia forest and grassland were at the medium and barren level, respectively. 3) Within the precipitation gradient of 370-470 mm, the soil quality index of three planting types all decreased with the decrease of precipitation. Among them, the Hippophae rhamnoides forest (2.34%) had the lowest coefficient of variation of the comprehensive index of soil quality, whereas, the Robinia pseudoacacia forest and grassland had higher coefficient of variation (25.27% and 34.34%, respectively). The findings can provide scientific datum and theoretical support to implement ecological forestry projects, with an emphasis on the vegetation restoration and reconstruction under the precipitation gradient of 370-470 mm in the loess area of northern Shaanxi, China. [ABSTRACT FROM AUTHOR]