Composting is widely used for recycling of urban sewage sludge to improve soil properties, which represents a potential pathway of spreading antibiotic resistant bacteria and genes to soils. However, the dynamics of antibiotic resistance genes (ARGs) and the underlying mechanisms during sewage sludge composting were not fully explored. Here, we used high-throughput quantitative PCR and 16S rRNA gene based illumina sequencing to investigate the dynamics of ARGs and bacterial communities during a lab-scale in-vessel composting of sewage sludge. A total of 156 unique ARGs and mobile genetic elements (MGEs) were detected encoding resistance to almost all major classes of antibiotics. ARGs were detected with significantly increased abundance and diversity, and distinct patterns, and were enriched during composting. Marked shifts in bacterial community structures and compositions were observed during composting, with Actinobacteria being the dominant phylum at the late phase of composting. The large proportion of Actinobacteria may partially explain the increase of ARGs during composting. ARGs patterns were significantly correlated with bacterial community structures, suggesting that the dynamic of ARGs was strongly affected by bacterial phylogenetic compositions during composting. These results imply that direct application of sewage sludge compost on field may lead to the spread of abundant ARGs in soils.