The rapid development of industrialization and urbanization has posed serious challenges for coastal farmland ecosystems. Source apportionment of soil heavy metals is an effective way for the detection of non-point source pollution in farmland to help support the high-quality development of coastal agriculture. To this end, 113 surface soil samples were collected in the coastal delta of China, and the contents of As, Cd, Cr, Cu, Ni, Pb, and Zn were determined. A variety of models were integrated to apportion the source of soil heavy metals, including positive matrix factorization (PMF), geographical detector (GD), eXtreme gradient boosting (XGBoost), and structural equation modeling (SEM). The result of PMF models revealed that there was collinearity between various heavy metals, and the same heavy metal may have a mixed source. The XGBoost model analysis indicated that there were significant non-linear relationships between soil heavy metals and source factors. A synergy between air quality and human activity factors was the key source of heavy metal that entered the study area, based on the results of the GD. Furthermore, the input path effect of heavy metals in the soil of the study area was quantified by SEM. The balance of evidence from the above models showed that air quality (SO2 and NO2) and factories in the study area had the greatest impacts on Cd, Cr, and Zn. Natural sources were dominant for Pb, while As, Cu, and Ni were contributed by soil parent material and factories. The above results led to the conclusion that there was a cycle path in the study area that continuously promoted the migration and accumulation of heavy metals in farmland soil; that is, the heavy metals discharged during oil exploitation and smelting entered the atmosphere and then accumulated in the farmland soil through precipitation, atmospheric deposition, and other paths. In this study, it is shown that a variety of models can be used to more comprehensively assess the sources of soil heavy metals. This approach can provide effective support for the rapid prevention and decision-making management of soil heavy metal pollution in coastal areas.