Accumulation of heavy metals in soil can lead to the deterioration of soil quality, reduce soil fertility and crop yields, and thus threaten human and animal health. The study aimed to assess the potential ecological risk of heavy metal contamination of agricultural soils in Kazakhstan. The study was carried out in 2021 on the soils of the Zhdanovskoye owner-operated farm in the Sokolovsko-Sarybai district of the Kostanay region. The quantitative content of heavy metals, such as lead (Pb), mercury (Hg), arsenic (As), and cadmium (Cd), was determined, and concentrations of trace elements, such as zinc (Zn), copper (Cu), iron (Fe), and manganese (Mn), were calculated for the considered contaminated lands. The potential ecological risk index (RI) proposed by L. Hakanson was used in the study concerning heavy metal contamination of soil. As a result, the presence of trace elements and heavy metals in the considered areas of the Kostanay region was shown. The RI values for all sites ranged from 137 to 447, corresponding to the level of ecological risk grading from low to high. The average RI for As, Cd, Hg, Pb, Zn, Ni, and Cu amounted to 328, which indicates a high ecological risk. Detected levels of As, Cd, Zn, and Pb in long-term abandoned mining areas were well above national thresholds, indicating the impending need to fully investigate and assess the suitability of the land for further agricultural use. The availability of such data will allow predicting cluster-based development of processing infrastructures in the vicinity of agricultural lands.