Abundant ARGs in dairy farms were detected using metagenomic sequencing.
Significant correlation of ARG richness was observed between the feces and soil.
Heavy metals participated in coselection processes for the ARGs in dairy farms.
High level of transposases coexisting with ARGs increased ARG dissemination risk.
Dairy feces is a huge pollution source of ARGs and heavy metals.