Accumulation of heavy metals in agricultural land and their ecological risks are key issues in soil security studies. This study investigated the concentrations of six heavy metals-copper (Cu), zinc (Zn), lead (Pb), nickel (Ni), and chromium (Cr) in Shenzhen's agricultural lands and examined the potential hazards and possible sources of these metals. Eighty-two samples from agricultural topsoil were collected. Potential ecological risk index was used to calculate the potential risk of heavy metals. Principal component analysis (PCA) was applied to explore pollution sources of the metals. Finally, Kriging was used to predict the spatial distribution of the metals' potential ecological risks. The concentrations of the heavy metals were higher than their background values. Most of them presented little potential ecological risk, except for the heavy metal cadmium (Cd). Four districts (Longgang, Longhua, Pingshan, and Dapeng) exhibited some degree of potential risk, which tended to have more industries and road networks. Three major sources of heavy metals included geochemical processes, industrial pollutants, and traffic pollution. The heavy metal Cd was the main contributor to the pollution in agricultural land during the study period. It also poses the potential hazard for the future. High potential risk is closely related to industrial pollution and transportation. Since the 1980s, the sources of heavy metals have evolved from parent rock weathering, erosion, degradation of organics, and mineralization to human disturbances resulting in chemical changes in the soil.