 This study used remote sensing imagery in machine learning algorithms to predict soil total nitrogen content in the northeastern coastal region of Hebei Province, China. The results showed that the XG Boost algorithm had the highest accuracy with an R2 value of 0.627, RMSE of 0.127G slash kg, and MA of 0.092G slash kg. Additionally, the combination of optical and SAR images improved prediction accuracy with their 2 increasing by 45.5%. Furthermore, the spatial distribution of soil total nitrogen content predicted by the three methods was similar, with higher concentrations found in the north and lower concentrations found in coastal regions. This article was authored by Qingwen Zhang, Mingyu Lu, Yongbin Zhang, and others.