Soil pollution caused by toxic metals poses serious threats to the ecological environment and human well-being. Accurately predicting toxic metal concentrations is critical for safeguarding soil environmental security. However, the distribution of soil toxic metal concentrations often exhibits significant spatial heterogeneity and intricate correlations with other environmental influencing factors, posing substantial challenges to accurate prediction. This study delves into the prospective application of a novel graph convolutional neural network model, namely DistNet-GCN. By capitalizing on the spatial relationships among sampling points, this model endeavors to predict cadmium (Cd) and arsenic (As) concentrations in soil. The distinctive feature of this model resides in its capacity to mimic the transmission process of relationships between soil Cd/As concentrations and the environmental influencing factors within a local spatial scope by integrating the powerful ability of GCN to extract the inter-node dependencies in complex networks. Subsequently, it extracts the critical features of the dataset from a spatial relationship graph structure by taking the spatial positions of sampling points as network nodes, the concentrations of toxic metals as node labels, and environmental factors as node attributes. In comparison with traditional models, the DistNet-GCN model achieves the highest prediction accuracy for soil Cd and As concentrations. Specifically, the R