This study examined the effect of habitat types and ontogenetic stages on the diet shift of Coreius guichenoti (Sauvage and Dabry de Thiersant, 1874), a critically endangered fish species. Based on the stable isotope analysis method, the following was explored: the variations in δ13C and δ15N values, isotopic niche width and four basal food sources (Mollusks, Macrocrustaceans, Aquatic insect larvae and particulate organic matters (POMs)) among three essential habitat types (the spawning ground, natural riverine feeding and nursery area, and Three Gorges Reservoir area) and between two ontogenetic stages (immature and fully mature stages). A diet shift associated with habitat type changes was observed, but there were no obvious differences in diet composition between the two ontogenetic stages. Dietary plasticity and a preference for specific foods were the important determinants of feeding behavior through the life history of this species. POM was important for the survival of this species in the resource-limited spawning ground, but this species fed more heavily on higher-order consumers in resource-abundant areas. This study highlights the importance of maintaining free connectivity among different habitats (particularly spawning grounds) to ensure the long-term sustainability of potamodromous fish species as well as the full investigation of all types of critical habitats for understanding the trophic ecology of a single fish species.