Trophic interactions represent the routes through which energy flows upwards within ecosystems and the understanding of such structuring under varying environmental conditions is still challenging. Here we test the hypothesis that differences in environmental variables act as environmental filters on the composition and trophic structure of local the fish fauna of a subtropical mountain river. We predict that differences in the trophic structure of the fish fauna occur along the river continuum. Main environmental parameters have been measured and fishes were sampled quarterly between August 2013 and May 2014 at six sampling sites in the main channel of the Pelotas River, Upper Uruguay ecoregion. We collected 3848 individuals belonging to 38 species, 4 orders and 11 families. The most (82.1%) consisted of small- and medium-sized individuals. The species were classified into eight trophic guilds: aquatic insectivorous, carnivorous, detritivorous, detritivorous/aquatic insectivorous, herbivorous, iliophagous, omnivorous and piscivorous. In general, herbivorous and piscivorous guilds were the most representative in both number and biomass. Significant differences detected by Permanova were for richness, numerical abundance and biomass between all the sites sampled. Relationships between the environmental variables and the composition of trophic guilds were observed along the longitudinal gradient by RLQ and fourth-corner analyses. The abundance of guilds omnivorous, aquatic insectivorous and herbivorous increases with higher values of chlorophyll-a and vegetation cover, especially characterizing the upstream sites (S1, S2 and S3). On the other hand, the abundance of the iliophagous, detritivorous/insectivorous and piscivorous guilds increases with greater values of width, temperature, inorganic phosphorus and total solids, a fact observed in downstream sites (S4, S5 and S6). Thus, it was possible to identify a clear variation in the trophic structure of the fish fauna along the Pelotas River (upstream-downstream), in which the local variables were efficient in predicting environmental filters that influence the trophic organization. In this scenario, our study follows the longitudinal model and evidences a greater accumulation of energy in food webs in the upstream-downstream direction, which favors the greatest abundance of piscivorous, detritivorous and iliophagous verified in stretches of greater volume and dimensions of river. These results highlight the importance of the local variables and the interrelationships in the lateral connectivity processes along the river continuum.