The use of heavy metals in economic and social development can create an accumulation of toxic waste in the environment. High concentrations of heavy metals can damage human and animal health, lead to the development of antibiotic resistance, and possibly change in bovine microbiota. It is important to investigate the influence of heavy metals in food systems to determine potential harmful effects environmental heavy metal contamination on human health. Because of a mining dam rupture, 43 million cubic meters of iron ore waste flowed into the Doce river basin surrounding Mariana City, Brazil, in 2015. Following this environmental disaster, we investigated the consequences of long-term exposure to contaminated drinking water on the microbiome and resistome of dairy cattle. We identified bacterial antimicrobial resistance (AMR) genes in the feces, rumen fluid, and nasopharynx of 16 dairy cattle 4 years after the environmental disaster. Cattle had been continuously exposed to heavy metal contaminated water until sample collection (A) and compared them to analogous samples from 16 dairy cattle in an unaffected farm, 356 km away (B). The microbiome and resistome of farm A and farm B differed in many aspects. The distribution of genes present in the cattle’s nasopharynx, rumen, and feces conferring AMR was highly heterogeneous, and most genes were present in only a few samples. The relative abundance and prevalence (presence/absence) of AMR genes were higher in farm A than in farm B. Samples from farm A had a higher prevalence (presence) of genes conferring resistance to multiple drugs, metals, biocides, and multi-compound resistance. Fecal samples had a higher relative abundance of AMR genes, followed by rumen fluid samples, and the nasopharynx had the lowest relative abundance of AMR genes detected. Metagenome functional annotation suggested that selective pressures of heavy metal exposure potentially skewed pathway diversity toward fewer, more specialized functions. This is the first study that evaluates the consequences of a Brazilian environmental accident with mining ore dam failure in the microbiome of dairy cows. Our findings suggest that the long-term persistence of heavy metals in the environment may result in differences in the microbiota and enrichment of antimicrobial-resistant bacteria. Our results also suggest that AMR genes are most readily detected in fecal samples compared to rumen and nasopharyngeal samples which had relatively lower bacterial read counts. Since heavy metal contamination has an effect on the animal microbiome, environmental management is warranted to protect the food system from hazardous consequences.