Herbivory is thought to be an inefficient diet, but it independently evolved from carnivorous ancestors in many metazoan groups, suggesting that plant‐eating is adaptive in some circumstances. In this study, we tested two hypotheses to explain the adaptive evolution of herbivory: (i) the Heterotroph Facilitation hypothesis (herbivory is adaptive because herbivores supplement their diets with heterotrophic microbes); and (ii) the Lipid Allocation hypothesis (herbivory is adaptive because algae, which have high lipid concentrations, are nutritionally similar to carnivory). We tested these hypotheses using enclosure cages placed in the Everglades and stocked with Sailfin Mollies (Poecilia latipinna), a native herbivore. Using shading and phosphorus addition (P), we manipulated the heterotrophic microbe and lipid composition of colonizing epiphyton and examined the effects of varying food quality on Sailfin Molly life history. Epiphyton grown in “shade only” conditions had a 55% increase in bacterial fatty acids and 34% lower ratios of saturated + monounsaturated to polyunsaturated fatty acids relative to the other treatments. Ratio of autotroph to heterotroph biovolume varied throughout the experiment, with a 697% increase at 3 weeks and 98% decrease at 6 weeks compared to the other treatments. Gut contents revealed that fish fed selectively on epiphyton to compensate for apparent deficiencies in the available food. Fish raised in “shade only” cages experienced the highest survival, which was best explained by autotrophic biovolume and algal‐ and bacterial‐derived fatty acids at 3 weeks (2–6× more likely than alternative models with ∆AICc > 2.00), and by percentage of bacterial fatty acids in the diet at 6 weeks (3–8× more likely than alternative models with ∆AICc > 2.00). There were no differences in fish growth among treatments. Autotrophic lipids play a role in early fish life history, but we did not find these to be the best predictors of life history later in the juvenile period. Instead, heterotrophic lipids facilitated the herbivorous diet and enhanced survival of juvenile fish in our experiment. Bacterial fatty acid content of the diet promoted herbivore survival, consistent with the Heterotroph Facilitation hypothesis. This is the first study to explicitly contrast Heterotrophic Facilitation and Lipid Allocation hypotheses for the adaptive evolution of herbivory in an aquatic system.