Afforestation transforms degraded soils in semi-arid regions, increasing microbial necromass and enhancing soil carbon and nitrogen pools, thereby improving ecosystem health.