It is widely recognized that climate change and human activities can alter the flow regimes and thus the fish habitats. Limited research has integrated fish habitats with swimming ability and ecological preferences of fish at various life stages to assess the impacts of climate change and human activities. Meanwhile, a comprehensive study of ecological flow combining fish habitats with swimming ability and ecological preferences of fish is currently lacking. Here the runoff under different scenarios was firstly acquired, including baseline scenario (BS, with no impact), climate change scenario (CS, impacted by climate change), and variation scenario (VS, impacted by climate change and human activities). Then, a habitat assessment framework encompassing the swimming ability of fish during migration stage and their ecological preferences during spawning and feeding stages was developed to assess fish habitats under different scenarios. In this framework, blocked index (BI) and percentages of the longest continuous river reach (PLR) were proposed to quantify the habitat connectivity conditions during migration stage. Habitat patch area (HPA), weighted usable area (WUA), and habitat connectivity index (HCI) were employed to assess fish habitats during spawning and feeding stages. Finally, a hydrology-hydrodynamic-habitat framework was established to quantify optimal ecological flow (OEF) and threshold ecological flow (TEF). The Jinsha River Basin (JRB) and the downstream reach of Xiangjiaba (XJB) hydropower station in the Jinsha River was selected as the study area and study reach, respectively. The results demonstrated that the habitat connectivity was slightly decrease due to climate change and greatly reduced under climate change and human activities during migration stage. During spawning and feeding stages, a reduction was observed in HPA, WUA, and HCI under climate change, and an accentuated reduction under climate change and human activities. The OEFs are in the ranges of 1500-2000 m3/s, 4800-6500 m3/s, and 3700-5800 m3/s for migration, spawning, and feeding stages, and the TEFs are 1300-2600 m3/s, 3500-8400 m3/s, and 2700-8100 m3/s, respectively. The current study provides an innovative and feasible habitat- ecological flow assessment scheme for managers to address the aquatic ecological degradation.