Fish habitat is an important component of riverine ecosystems. Ecological flow has been proven essential to conserving riverine fish habitats. On the basis of using habitat quantity to estimate ecological flows, this study introduced the landscape ecology method to take habitat quality into consideration. A fuzzy logic-based fish habitat suitability model was developed to establish the relationship between flow and habitat quantity; and then indices of fragmentation and connectivity based on landscape ecology were introduced to improve the model to allow the evaluation of habitat quality. Through simulations using the improved model, a relationship between flow and habitat quality was established. By defining a habitat quality conservation target and combining it with hydrological seasonality, a corresponding ecological hydrograph can be determined. The middle reach of the Lijiang River in China was chosen as a study case and the habitat of the indigenous fish Spinibarbus hollandi (S. hollandi) was taken as the conservation target of ecological flow. Compared to the previous ecological flows considering only habitat quantity, the flows considering habitat quality seemed to be more ecologically meaningful. The case study also showed that the method developed here provides a promising approach for ecological hydrograph estimation.