Eucalyptus afforestation negatively affects the ecological condition of streams by impacting macroinvertebrates, whose responses to habitat deterioration and changes in basal resources are not well understood. This study examines the effects of Eucalyptus afforestation on macroinvertebrate functional diversity and trait structure, driven by variations in local habitat and basal resources. The study was conducted once in summer and winter across 27 subtropical lowland streams along an Eucalyptus spp. afforestation gradient. We measured physicochemical water parameters, habitat variables (substrates, depth and current velocity) and biomass of basal resources (macrophytes, periphyton and detritus) simultaneously with macroinvertebrate sampling. We used co-inertia multivariate RLQ and four-corner analyses to explore relationships between physicochemical water parameters, local habitat and basal resources, with trait structure. Structural equation modelling-SEM was used to understand the direct and indirect effects of Eucalyptus afforestation on macroinvertebrate functional diversity. SEM revealed that Eucalyptus afforestation indirectly reduced macroinvertebrate functional diversity by reducing macrophyte biomass in both seasons. The RQL analysis revealed a positive correlation among the biomass of macrophytes, density of predators and number of small- and medium-sized animals. This suggests that the decrease in macrophyte biomass may affect the available refuges and biological interactions by affecting predators and small and medium body sizes. These findings emphasise the importance of macrophytes in sustaining a unique functional trait composition of macroinvertebrates in stream ecosystems. Although afforestation did not influence substrate types, they positively affect functional diversity. Macroinvertebrate functional traits are effective indicators of ecological degradation in streams affected by Eucalyptus afforestation.