The potentially toxic element (PTE) content and physical and chemical properties of 37 wolfberry and root soil samples obtained from Zhongning county and Shapotou district (Ningxia Hui Autonomous Region) were analyzed, and a potential ecological risk assessment was performed. In addition, multiple linear regression and geostatistical methods were used to predict and analyze the PTE concentrations and potential ecological risks of both soil and wolfberries. The PTE content in the soil was within the standard limits, and only one wolfberry sample contained Cd exceeding the standard limit (by 2.7%). The other potentially toxic elements (PTEs) did not exceed the standard limits. In the regression fitting, the models obtained for Cu, Zn, Pb, and Ni contents in the fruits showed a good correlation (p < 0.05), the PTE content of the soil showed an overall trend of high concentrations in the central part of the studied region. The ecological risk of Hg in the soil is rated as high, whereas the risks of the remaining PTEs were mostly medium or low. Further, the predicted PTE content of the wolfberries was generally high in the western region and low in the eastern region, although there were slight variations for different PTEs in some areas.