Heavy metals are the most important indicator for farmland soil; however, in China, few provincial and national scales of studies have been done on heavy metals. Herein, by retrieving published studies, we calculated the spatial distribution characters and evaluated the health risks of Cu, Zn, Cd, Ni, Pb, Cr, As, and Hg in the farmland soil of 146 cities in China. Results showed that (1) the range (mean) values of eight (metalloid) heavy metals were as follows in mg/kg: Cu 0.236–251.015 (44.604), Zn 0.151–1547.060 (154.203), Cd 0.014–39.100 (1.497), Ni 0.709–554.420 (41.968), Pb 0.327–495.400 (55.143), Cr 0.078–333.510 (70.093), As 0.836–60.000 (12.207), and Hg 0.008–12.190 (0.371). The coefficient of variation values of Cu, Cr, and As displayed moderate variation, and Zn, Cd, Ni, Pb, and Hg displayed high variation (142.148–364.960%). (2) the Igeo values of As, Cu, Cd, Ni, Zn, Cr, Pb, and Hg were − 4.329 to 1.837, − 7.166 to 2.888, − 3.378 to 8.070, − 5.831 to 3.780, − 9.527 to 3.797, − 10.120 to 1.866, − 6.899 to 3.667, and − 3.681 to 6.966, respectively; in many cities, there was some degree of heavy metal pollution of the farmland soil such as Zn in Pingdu, Pb in Huludao, and Hg in Tongguan, Funshun, Huludao, and Qinglong (Igeo > 3); there were no obvious spatial patterns of Cr, Ni, and As, and Zn, Cu, but Cd, Ni, Pb, and Hg mainly located in some cities in the southwest, central or eastern parts of China. (3) Health risk assessment showed that with the exception of Cd, Cr, and As by the respiration route and Ni, Cr, and As through skin exposure, the average amount of daily exposure of the eight (metalloid) heavy metals all showed values for children > adults, and the HQ and HI values were all lower than 1.0, indicating noncarcinogenic risks; calculation of carcinogenic risks showed there were no carcinogenic risks for As, Cr, Ni, and Cd; however, the value for Cr was the maximum and contributed 98.505% of the total.