Shrimp farming is blooming worldwide, posing a severe threat to mangroves and its multiple goods and ecosystem services. Several studies reported the impacts of aquaculture on mangrove biotic communities, including microbiomes. However, little is known about how mangrove soil microbiomes would change in response to mangrove forest recolonization. Using genome-resolved metagenomics, we compared the soil microbiome of mangrove forests (both with and without the direct influence of shrimp farming effluents) with active shrimp farms and mangroves under a recolonization process. We found that the structure and composition of active shrimp farms microbial communities differ from the control mangrove forests, mangroves under the impact of the shrimp farming effluents, and mangroves under recolonization. Shrimp farming ponds microbiomes have lower microbial diversity and are dominated by halophilic microorganisms, presenting high abundance of multiple antibiotic resistance genes. On the other hand, control mangrove forests, impacted mangroves (exposed to the shrimp farming effluents), and recolonization ponds were more diverse, with a higher abundance of genes related to carbon mobilization. Our data also indicated that the microbiome is recovering in the mangrove recolonization ponds, performing vital metabolic functions and functionally resembling microbiomes found in those soils of neighboring control mangrove forests. Despite highlighting the damage caused by the habitat changes in mangrove soil microbiome community and functioning, our study sheds light on these systems incredible recovery capacity. Our study shows the importance of natural mangrove forest recovery, enhancing ecosystem services by the soil microbial communities even in a very early development stage of mangrove forest, thus encouraging mangrove conservation and restoration efforts worldwide.