Abstract:The integration of aquatic ecosystems is significantly affected by the increasing population and urbanization of megacity regions. Currently, studies on river habitats are mainly focused on local watersheds. However, systematic research on the identification of river habitats in large watersheds is lacking. Here, we developed an identification method based on four indicators, including river curve degree, elevation gradient, dry-up risk, and salinity. Detailed spatial data is required to classify river habitats. We extracted 6254 river sections based on current digital data and experience, and the total rivers were then classified into 15 types using the four indicators and these 6254 river sections. Fish diversity was used to assess the heterogeneity of river habitats. We sampled fish from 52 river sites, quantified their species, and determined the degree of biodiversity. The results showed that: (1) fish diversity is determined by the river elevation gradient and dry-up risk. A river with a high elevation gradient has high fish diversity as well as low dry-up risk. (2) The curve degree of rivers has little influence on fish diversity. This study found that the river's habitat is not dependent on the utilization function of water resources in the Beijing-Tianjin-Hebei megacity region. Water resource preservation zones should be improved by considering river dry-up risks in this region. The water ecological security patterns should be developed based on multiple sources of knowledge of the water utilization function, city development plan, and river habitat characteristics.