This study systematically investigated the variation of antibiotic resistance genes (ARGs) and mobile genetic elements (MGEs) in cattle manure (CM) composting at different temperatures. Co-composting CM with or without garden substrate to obtain high-temperature (HT, up to 70 °C) and low-temperature (LT, below 40 °C) treatments. The results showed that the final composts of the HT and LT treatments both could meet the Standards of Organic Fertilizer (NY525-2021). However, HT pile had totally different bacterial communities with LT’s, they both from Psychrobacter of Firmicutes to Longispora and Actinomadura of Actinobacteria, respectively. The HT composting removed 86% ARGs, while LT increased 83 times of them. Macrolide resistance genes changed significantly and were most positive correlated with MGEs in both trails (r=0.78 and 0.68 of HT and LT piles, respectively), and ermE and ermB were the most significant genes with intIII in the correlation of the two protocols (p<0.001). The network analysis indicated that in the HT pile, Psychrobacter, Proteiniphilum, Tissierella, and Atopostipes were important hosts for ARGs, and gene ermC had the most diverse potential host genus, while Pseudomonas and ermX were the potential host and universal gene in LT composting, and intII as the integrate gene had significant influence on the horozental transfer of ARGs. Structural equation models (SEM) revealed that the temperature influenced more in CM+GS than CM piles, and the main factors affecting macrolide resistace genes was MGEs in both treatments. This results could provide insights and guidance for the safety use of manure compost products in agriculture, and improve the utilization value of organic compost.