Mercury (Hg) contamination poses a major hazard to ecosystems because it alters plant physiology, biochemistry, and metabolism. The impact is a competition for plant absorption space between Hg and nutrients (such as nitrogen) in the soil and plant system. The goal of this research was to quantitatively examine the interplay between mercury and nitrogen in ex-gold mining soil in Dharmasraya, West Sumatra. This study used a survey method to assess the diversity of ex-gold mining areas owned by each region (area and mining spots) at depths ranging from 0−20 cm to 20−40 cm, with three (Tebing Tinggi at spot 1 and Gunung Medan) to five (Tebing Tinggi at spot 2, Sikabau, and Koto Padang) replicates and a total of 54 samples. The ex-gold mining soil at Dharmasraya, has low fertility levels, including pH (4.03), CEC [7.15 cmol(+) kg−1], OC (0.04% C), and total N (0.09% N), as well as a very high Hg content of 4.18 mg kg−1. The interaction between mercury and nitrogen was non-significant at the 0.01 (2-tailed) level, with r = 0.167 and a linear equation y = 3.2164x + 3.8849; R² = 0.0276, indicating that mercury does not compete with N nutrients in ex-gold mining soil. However, the release of N by vegetation decomposition (OM-N) through the process of mineralization of C, as evidenced by the positive correlation between N and organic C (r = 0.645** with linear equation y = 0.5445x - 0.0115; R² = 0.4153), and also the release of Hg, which is absorbed from OM-N, as evidenced by the positive correlation between Hg and OC (r = 0.417** with linear equation y = 0.0182x − 0.0379; R² = 0.1744). Keywords: Dharmasraya, ex-gold mining soil, mercury, nitrogen