Studying the status and source analysis of heavy metal pollution in farmland in typical mining and processing areas is an important prerequisite for promoting farmland soil ecological restoration and farmland protection in concentrated mining areas. In this study, the heavy metal content of farmland soil around a mining area in southwest China was detected, and the pollution status, distribution law, health risks, and sources of heavy metals were studied by using the land accumulation index method, comprehensive pollution index method, kriging interpolation method, health risk assessment method, and PMF receptor model on the sampling data. The results showed that the mean values of eight heavy metals in farmland soil except Ni exceeded the local soil background values, and the results of the ground accumulation index evaluation showed that Cd and Hg were extremely polluted; Pb and As showed medium pollution-heavy pollution; and Cr, Zn, Ni, and Cu were lightly polluted. In the health risk assessment, oral ingestion was the main exposure route posing a health risk to the human body; the main element that constituted non-carcinogenic health risks was As, and the carcinogenic risks were from As and Cd. PMF model analysis showed that the contribution rate of weathering natural sources of iron-bearing ore was 28.02%, and the main factors were Ca and Fe. The contribution rate of agricultural sources was 3.02%, and the main factors were Pb and As. The contribution rate of industrial and atmospheric deposition composite sources was 33.09%, and the main factor was Hg. The contribution rate of the parent material source was 17.27%, and the main factor was Ca. The contribution rate of mining activities such as mining and smelting was 18.60%, and the main factors were Zn and Cd.