were the most significantly different typical MGEs among the rivers in urban and suburban Shijiazhuang. ④ PCoA and NMDS analyses showed significant spatiotemporal differences in MGEs between urban and rural rivers. ⑤ Correlation analysis and co-occurrence results indicated that the abundance of MGEs in urban rivers was significantly positively correlated with antibiotic concentration, industrial enterprises, sewage treatment plants, total population, livestock farming, and aquaculture. In suburban rivers, the abundance of MGEs was mainly significantly positively correlated with antibiotic concentration, livestock farming, aquaculture, and total population. Overall, by comparing the spatiotemporal heterogeneity of MGEs in urban and rural rivers and identifying the main driving factors of MGEs in urban and suburban rivers, this study provides data support for subsequent risk management and control of antibiotic resistance in different rivers.