The process of composting has been proposed as a biological alternative to improve the quality of tannery sludge (TS) by the action of microbial communities. However, there is limited knowledge about the dynamic of these microbial communities during the composting process. This study assessed the responses of bacterial and archaeal communities during TS composting using the 16S rRNA sequencing. The composting process occurred within 90 days, and samples of compost were collected on day 7 (d7; mesophilic stage), 30 (d30; thermophilic stage), 60 (d60; cooling stage), and 90 (d90; maturation stage). The results showed a succession of microbial phyla during the composting with enrichment of Synergistetes, WS1, and Euryarchaeota at the mesophilic stage, while at the thermophilic stage, there was an enrichment of Hydrogenedentes, WPS-2, Chloroflexi, and Deinococcus-Thermus. At the cooling stage, there was an enrichment of Kiritimatiellaeota, and at the maturation stage, there was an enrichment of Entotheonellaeota, Dadabacteria, Nitrospirae, Dependiatiae, and Fibrobacteres. When analyzing the drivers influencing microbial communities, Cr and pH presented more negative correlations with general phyla. In contrast, S, C, K, temperature, and N presented more positive correlations, while Ni, Cd, and P showed fewer correlations. According to niche occupancy, we observed a decreased proportion of generalists with a consequently increased proportion of specialists following the composting process. This study showed that different stages of the composting present a specific microbial community structure and dynamics, which are related to some specific composting characteristics.