To improve the yield and quality of dryland wheat and clarify the correlation between soil fertility gradient, fertility indicators and wheat yield, quality traits respectively, the influence of soil fertility gradient and its indicators on wheat yield and quality traits in hilly areas was studied in Xiangning County, Shanxi Province from 2019 to 2020. The results showed that soil fertility gradient had obvious influence on panicle number, grain number per panicle and 1000-grain weight; nitrate nitrogen, total nitrogen, organic matter, available potassium and yield, spike number, 1000-grain weight showed positive correlations; available phosphorus and yield, spike number showed linear positive correlation, while no significant difference between available phosphorus and 1000-grain weight and nitrate nitrogen; the correlation between total nitrogen, organic matter, rapidly available potassium, available phosphorus and spike number was not significant; the correlation degree of different soil fertility indicators with yield and three yield factors showed nitrate nitrogen>total nitrogen>organic matter>available potassium>available phosphorus. Soil fertility gradient had obvious influence on protein content, wet gluten content, ductility, stability time and formation time; three traits of total nitrogen, available potassium and nitrate nitrogen were positive correlated with protein content, wet gluten content, ductility, stability time and formation time, organic matter was positive correlated to ductility, while it was not significant to the other quality traits; available phosphorus was not significantly correlated with protein content, wet gluten content, ductility, stability time and formation time, the correlation degree between different fertility indicators and quality traits generally showed nitrate nitrogen> available potassium> total nitrogen> organic matter> available phosphorus. Yield was positively correlated with protein content, wet gluten content, ductility and formation time, but it was not significant with stable time.