The effect of changes in microbial community structure on the migration and release of toxic heavy metal (loid)s is often ignored in ecological restoration. Here, we investigated a multi-metal (mercury and thallium, Tl) mine waste slag. With particular focus on its strong acidity, poor nutrition, and high toxicity pollution characteristics, we added fish manure and carbonate to the slag as environmental-friendly amendments. On this basis, ryegrass, which is suitable for the remediation of metal waste dumps, was then planted for ecological restoration. We finally explored the influence of changes in microbial community structure on the release of Tl and As in the waste slag during vegetation reconstruction. The results show that the combination of fish manure and carbonate temporarily halted the release of Tl, but subsequently promoted the release of Tl and arsenic (As), which was closely related to changes in the microbial community structure in the waste slag after fish manure and carbonate addition. The main reason for these patterns was that in the early stage of the experiment, Bacillaceae inhibited the release of Tl by secreting extracellular polymeric substances; with increasing time, Actinobacteriota became the dominant bacterium, which promoted the migration and release of Tl by mycelial disintegration of minerals. In addition, the exogenously added organic matter acted as an electron transport medium for reducing microorganisms and thus helped to reduce nitrate or As (Ⅴ) in the substrate, which reduced the redox potential of the waste slag and promoted As release. At the same time, the phylum Firmicutes, including specific dissimilatory As-reducing bacteria that are capable of converting As into a more soluble form, further promoted the release of As. Our findings provide a theoretical basis for guiding the ecological restoration of relevant heavy-metal (loid) mine waste dumps.