The widespread application of macrolide antibiotics has caused antibiotic resistance pollution, threatening the river ecological health. In this study, five macrolide antibiotics (azithromycin, clarithromycin, roxithromycin, erythromycin, and anhydro erythromycin A) were monitored in the Zao River across three hydrological periods (April, July, and December). Simultaneously, the changes in antibiotic resistance genes (ARGs), mobile genetic elements (MGEs), and planktonic bacterial communities were determined using metagenomic sequencing. A clear pollution gradient was observed for azithromycin and roxithromycin, with the concentrations in the dry season surpassing those in other seasons. The highest concentration was observed for azithromycin (1.36 μg/L). The abundance of MLS resistance genes increased along the Zao River during the dry season, whereas the opposite trend was obtained during the wet season. A significant correlation between the levels of MLS resistance genes and macrolide antibiotics was identified during the dry season. Notably, compared with the reference site, the abundance of transposase in the effluent from wastewater treatment plants (WWTPs) was significantly elevated in both dry and wet seasons, whereas the abundance of insertion sequences (IS) and plasmids declined during the dry season. The exposure to wastewater containing macrolide antibiotics altered the diversity of planktonic bacterial communities. The bacterial host for ARGs appeared to be Pseudomonas, primarily associated with multidrug subtypes. Moreover, the ARG subtypes were highly correlated with MGEs (transposase and istA). The partial least-squares path model (PLS-PM) demonstrated a positive correlation between the abundance of MGEs and ARGs, indicating the significance of horizontal gene transfer (HGT) in the dissemination of ARGs within the Zao River. Environmental variables, such as TN and NO3--N, were significantly correlated with the abundance of MGEs, ARGs, and bacteria. Collectively, our findings could provide insights into the shift patterns of the microbiome and ARGs across the contamination gradient of AZI and ROX in the river.