The bioleaching utilizing indigenous microbial inoculation can continuously improve the dewaterability of sludge. In this study, metagenomic analysis was innovative employed to identify the key microorganisms and functional genes that affect the dewatering performance of sludge in the bioleaching conditioning process. The results demonstrated that long-term repeated inoculation of acidified sludge resulted in increased abundance of many functional genes associated with the transport of carbohydrate and amino acid. Additionally, genes encoding key iron transport proteins (such as afuA, fhuC, and fhuD) and genes related to electron transfer carriers in ferrous iron oxidation process (such as rus and cyc2) were significantly enriched, thereby promoting the improvement of sludge dewatering performance through enhanced iron oxidation. Notably, Acidithiobacillus, Betaproteobacteria, and Hyphomicrobium were the major sources of functional genes. This study reveals the microscopic mechanisms underlying the improvement of sludge dewaterability through bioleaching based on mixed culture from a novel perspective of gene metabolism.