The ground cracks resulting from coal mining activities induce alterations in the physical and chemical characteristics of soil. However, limited knowledge exists regarding the impact of subsidence caused by coal mining on the distribution of potentially toxic elements (PTEs) fractions in farmland soil. In this study, we collected 19 soil profiles at varying depths from the soil surface and at horizontal distances of 0, 1, 2, and 5m from the vertical crack. Using BCR extraction fractionation, we determined the geochemical fractions and total concentrations of Chromium (Cr), nickel (Ni), copper (Cu), zinc (Zn), arsenic (As), cadmium (Cd) and lead (Pb) to investigate their ecological risk, spatial fraction distribution, and main influencing factors. Results showed that the values of Cd appearing in 68.7% of the samples were higher than 40 and less than 80, presented a moderate ecological risk. Chromium (Cr), nickel (Ni), copper (Cu), zinc (Zn), arsenic (As), and lead (Pb) were mainly bound to residual fractions (> 60%) with lower mobility and Cd was dominated by F1 (acid-soluble fractions, 50%) and F2 (reducible fractions, 29%) in surface soil (0-20cm). The geochemical fractionation revealed that the mobile fractions (F1-acid-soluble and F2-reducible) of PTEs were primarily located near the crack, influenced by available potassium. In contrast, the less mobile fractions (F3-oxidizable and F4-residual) exhibited higher concentrations at distances of 2 and 5m from the crack, except for arsenic, influenced by the presence of clay particles and available phosphorus.