BACKGROUND As the significant factor of the accumulation of heavy metals in farmland soils, mineral activities such as mining, traffic and mineral processing and smelting allow heavy metals to spread into the surrounding environment by water or atmospheric deposition, and finally collected into the soil, causing heavy metal pollution in the surrounding farmland soil. Heavy metals pollution in soils especially in farmland soils around the mining area thus has received great attention in the field of environmental pollution. Located in the middle reaches of the Yellow River watershed, the gold mining area in western Henan is an extremely important gold deposit area with great prospecting potential in China for the strong late Yanshan acidic magmatic activity and the extremely favorable metallogenic geological conditions, in which more than 40 large, medium or small gold deposits have been discovered. Under the background of ecological protection and high-quality development in the Yellow River watershed, the western Henan gold mining area, with a long history of gold mining development, lacks more attention to the accumulation, spatial distribution and ecological risk of heavy metals in farmland soil around the mining area during the years of mining, beneficiation and processing. It is particularly necessary to study the heavy metal pollution in soil, find out the impact of mining activities on heavy metals in surrounding farmland soil, and provide a scientific basis for prevention and control of heavy metal pollution in farmland soil. OBJECTIVES To clearly understand the impact of mining activities in the western Henan mining area on heavy metals in the surrounding farmland soil, provide necessary basic data for supporting the safe production of key mineral resources, the surrounding agricultural safety, and prevent and control heavy metal pollution in farmland soil. METHODS 375 topsoil samples from the farmland around the western Henan gold mining area at a depth of 0-20cm were systematically investigated and analyzed with reference to Code of Practice for Soil Geochemical Survey (DZ/T 0145—2017). The contents and spatial distribution characteristics of Cd, Cu, Zn, Pb, Hg, As, Cr, Ni were analyzed. The heavy metal pollution and ecological risk were evaluated by the geo-accumulation index method and potential ecological risk index method. RESULTS (1) The contents variation range of Cu, Pb, Zn, Ni, As, Hg, Cd, Cr are 1.00-71.72, 2.00-524.79, 8.00-320.37, 2.00-52.77, 2.29-24.64, 0.0067-0.268, 0.04-1.30, 28.20-107.93, respectively, and the average are 35.33, 74.43, 137.69, 31.60, 12.39, 0.064, 0.43, 76.27, respectively, showing significant differences between the 8 heavy metals. Compared with the soil background value in the middle reaches of the Yellow River, the average contents of Cu, Pb, Zn, Ni, As, Hg, Cd, Cr are 1.47, 3.24, 2.06, 1.05, 1.03, 1.52, 2.77 and 1.07 times of them, respectively, but lower than the value of risk screening values for soil contamination of agricultural land.(2) The characteristics of coefficients of variation show that Pb(90.72%)>Hg(85.25%)>Cd(65.65%)>Zn(44.0%)>Cu(33.66%)>As(31.72%)>Ni(24.23%)>Cr(13.61%), the Pb, Hg, Cd are the primary factors causing the soil pollution as the external input by mineral activities for the high coefficients of variation and special relation with mining. The main ore-forming elements in the gold deposit area are Au and Mo, and the associated elements are Cu, Pb, Zn, Ni, As, Hg, Cd, which may diffuse into the surrounding environment during ore transportation, waste rock and slag piling along the river, and processing. Alongside the Daping River, the two gold mining areas and concentrators are distributed around the farmland, and the gold ore heap leaching site on the east side is located at the top of the hillside and hill. The heavy metals produced by mining activities can diffuse in the downstream agricultural areas through atmospheric deposition, rainwater leaching, river drainage, and can accumulate in the surrounding agricultural soil, causing heavy metal pollution in the agricultural soil around the mining area.(3) The geo-accumulation index of 8 heavy metals is -0.1, 0.74, 0.33, -0.56, -0.60, -0.29, 0.62, -0.49 with the order Pb>Cd>Zn>Cu>Hg>Cr>Ni>As, in which Cu, Hg, Cr, Ni, As show no influence to the quality of soils for the average geo-accumulation index lower than 0, and Pb, Cd, Zn show moderate pollution for the average geo-accumulation index between 0-1. Among them, the proportion of samples with a Cd element of medium or higher impact grade is 20.27%, the proportion of samples with medium to strong impact grade is 7.73%, and the proportion of samples with strong impact grade is 1.07%. The proportion of samples with a Pb element above the moderate impact level is 18.93%, and the proportion of samples with moderate to strong impact level is 10.40%. Hg and Zn also have 7.46% and 13.33% of the samples reaching the moderate impact level, indicating that Hg, Cd and Pb in the soil at local sampling sites have different degrees of impact on farmland soil quality.(4) The average value of the single-factor potential ecological risk index of eight heavy metals is between 2.06 and 83.62, among which the single-factor potential ecological risk index of As, Cr, Ni, Cu and Zn is a slight potential ecological risk. Pb is mainly subject to slight potential ecological risks for 92% of samples, moderate potential ecological risks for 7.47% of samples and strong potential ecological risks for 0.53% of samples. Cd is dominated by moderate potential ecological risks, with 46.14% of samples, and there are 25.33% and 10.93% of samples reaching strong and very strong potential ecological risks respectively. For the ecological risk index of Hg, there are 35.47%, 11.46%, 4.27% and 3.20% of the samples that reach moderate, strong, very strong and very strong degree. The comprehensive potential ecological risk index (RI) ranges from 51.66 to 689.64, with an average of 192.07. The proportion of samples with slight, moderate, strong and very strong impact degree is 46.40%, 41.07%, 11.20% and 1.33%, respectively. The overall comprehensive potential ecological risk index shows moderate potential ecological risks. CONCLUSIONS Compared with the risk screening values for soil contamination of agricultural land, the contents of Cd, Cu, Zn, Pb, Cr, Ni, As, Hg are all lower than the standard, indicating low risk for the soil environment. There were different degrees of accumulation surrounding the intense mining area of Cd, Pb, and Zn by longtime mineral development. Cu, Ni, As, Hg, and Cr were influenced by the natural factor. The farmland area with strong and very strong comprehensive potential ecological risks is 349.4 hectares and 11.71 hectares, respectively. Cd and Hg are the main contributing elements, with higher risk to the soil ecology, which should be monitored and controlled from source to avoid the further accumulation of heavy metal elements in the soil.