The global water crisis affects water quality and aquatic ecosystems leading to shifts in the structure of microbial community that can be used for monitoring environmental change. The current study aims to use eDNA metabarcoding to elucidate the structure and diversity of microbial communities along a pollution gradient in a tropical river. Sampling was carried out at four sites, along an anthropogenic disturbance gradient in Mexico City (Magdalena River). The results show clear differences in the composition of the prokaryotic and microeukaryotic communities between sites. Bacterial communities in sites with low to moderate disturbance were associated with nitrogen biogeochemical processes or plant-microbe interactions, while those in sites with moderate to high disturbance levels were associated with enteric, nosocomial, or fecal nature. Microbial communities in peri-urban sites had a greater diversity of phyla, while microeukaryotic communities decreased in the number of present phyla, as the gradient of human influence progresses, showing that 2 phyla together contribute with a relative abundance greater than 75% through the year. We propose that the characterization of the microbial community structure is better for identifying anthropogenic influences on lotic systems than the use of single species.