The effects of three Bacillus strains and one Saccharomyces cerevisiae strain on nitrogen transformation and microbial communities in pig and chicken manure compost were investigated. The findings revealed that employing compound microbial inoculants raised compost temperature, expedited moisture reduction, enhanced cellulase activity, and stimulated the accumulation of NH4+-N, NO3–N, and total nitrogen (TN), resulting in a 9% increase in TN content. The abundance of Firmicutes at the maturation phase decreased by 3.95%, Actinobacteria and Bacteroidetes increased by 1.64% and 1.85%, respectively. Inoculation resulted in an augmentation of amoA, nxrA, and nifH gene copy numbers, while concurrently reducing the abundance of nirK, nosZ, and nirS genes. Furthermore, it led to an increase in functional enzyme levels, specifically nif and amo, along with a corresponding decrease in nor. Clostridium, Phascolarctobacterium, Eubacterium, and Faecalibacterium from class Clostridium, which exists a significant correlation with nifH and nxrA genes, suggesting their likely pivotal role in nitrogen retention and fixation. Inoculation helped remove pathogenic bacteria and ARGs like fluoroquinolones, nucleoside and nitroimidazole. This study provide effective theoretical support for nitrogen retention and fixation mechanism and improving the quality of compost.