Bacteria and other microbes are important contributors to arsenic biotransformation processes, which can alter the bioavailability and toxicity of arsenic within a contaminated environment. Multispecies biofilms, known as periphyton, have been identified as a significant site of arsenic bioaccumulation within shallow freshwater lakes impacted by legacy arsenic contamination. We hypothesized that prolonged arsenic exposure results in the formation of distinct prokaryotic communities within the periphyton and other environmental compartments in arsenic-contaminated lakes compared to uncontaminated lakes. We also predicted that the periphyton prokaryotic communities would be distinct from, but partially overlapping with, those found in the surrounding water column and nearby littoral sediment. To test these hypotheses, we determined the taxonomic composition and modeled the assembly processes that yielded the bacterial communities found within three environmental compartments (periphyton, littoral sediment, and water column) of three lakes that had been differentially impacted by legacy arsenic contamination. We identified unique microbiomes within these environmental compartments and observed a clear shift in microbial community composition within high arsenic-contaminated periphyton. Accumulation of arsenic (~400 ppm) in the periphyton correlated with non-random (deterministic) selection for prokaryotic taxa that are more related than expected by chance (homogenizing selection). We also identified key prokaryotic genera within the arsenic-contaminated periphyton that suggest prolonged arsenic contamination may shift iron and methane biogeochemical cycles, which may regulate arsenic accumulation and mobilization. Our results imply that legacy arsenic contamination, by altering bacterial community composition and metabolic potential at the base of the food web, may influence biogeochemical and nutrient cycles at a larger scale within a freshwater lake ecosystem.