In order to investigate the effects of fertilization on soil chemical characteristics and ecological security, the chemical characteristics and ecological security risk analysis of heavy metal elements in a certain soil caused by fertilization were proposed. The contents of Ni, V, Cr, As, Cd, Pb, Zn, and Hg in 1,065 surface soil samples collected in a district of a city in the southwest agricultural area were tested and analyzed. Multivariate statistical analysis and spatial analysis were used to clarify the geochemical distribution characteristics of these heavy metals, and the possible main sources were also discussed. The results showed that the eight heavy metals could be divided into three categories. The first category included Ni, V, Cr, and As, whose content was lower than the background value in Beijing. And the distribution was mainly affected by natural factors such as parent materials of soil formation. The second category included Cd, Pb, and Zn, whose average content was higher than the background value. And the content was the highest in residential areas. In addition to the parent material inherited from the soil, the distribution characteristics of these elements were greatly affected by human activities. And Cd was significantly more affected by human activities than Pb and Zn. The third category included Hg, and it was inferred that atmospheric deposition was the main factor affecting the distribution of Hg. It was concluded that the Hakanson method was used to evaluate the ecological risk of heavy metals in soil, and the results showed that the potential ecological risk index was low in the area.