Background: One of the most widely accepted ecomorphological relationships in vertebrates is the negative correlation between intestinal length and proportion of animal prey in diet. While many fish groups exhibit this general pattern, other clades demonstrate minimal, and in some cases contrasting, associations between diet and intestinal length. Moreover, this relationship and its evolutionary derivation have received little attention from a phylogenetic perspective. This study documents the phylogenetic development of intestinal length variability, and resultant correlation with dietary habits, within a molecular phylogeny of 28 species of terapontid fishes. The Terapontidae (grunters), an ancestrally euryhaline-marine group, is the most trophically diverse of Australia’s freshwater fish families, with widespread shifts away from animal-prey-dominated diets occurring since their invasion of fresh waters. Results: Description of ontogenetic development of intestinal complexity of terapontid fishes, in combination with ancestral character state reconstruction, demonstrated that complex intestinal looping (convolution) has evolved independently on multiple occasions within the family. This modification of ontogenetic development drives much of the associated interspecific variability in intestinal length evident in terapontids. Phylogenetically informed comparative analyses (phylogenetic independent contrasts) showed that the interspecific differences in intestinal length resulting from these ontogenetic developmental mechanisms explained ~65% of the variability in the proportion of animal material in terapontid diets. Conclusions: The ontogenetic development of intestinal complexity appears to represent an important functional innovation underlying the extensive trophic differentiation seen in Australia’s freshwater terapontids, specifically facilitating the pronounced shifts away from carnivorous (including invertebrates and vertebrates) diets evident across the family. The capacity to modify intestinal morphology and physiology may also be an important facilitator of trophic diversification during other phyletic radiations.