Periods of streamflow cessation and stream drying are increasing in frequency and intensity in many regions of the world due to climate change, land-use change, and increased groundwater pumping. Thus, streams with intermittent flow will likely continue to grow in their global extent, which is thought to already surpass that of perennial streams. Yet, variability in streamflow and aquifer-stream exchange associated with flow cessation and drying is not well understood, nor is the influence of hydrological variability on aquatic communities and their habitat. This study aimed to characterize the heterogeneity of physical and chemical characteristics of habitat and the associated variability in benthic macroinvertebrate (BMI) communities in relation to spatial and temporal variability in streamflow and aquifer-stream exchange. Habitat conditions and BMI communities varied between individual sites, riffle and pool habitat, and between an intermittent riffle and a perennial riffle maintained by groundwater discharge. Unlike other studies, BMI richness, diversity, and abundance were consistently higher at intermittent riffle sites than perennial riffle sites, which were similar in BMI community composition to pool sites. High velocity distinguished the intermittent riffle sites, while two flow-loving BMI taxa distinguished their communities. This suggests that site-specific heterogeneity in habitat conditions was a key control on spatial and temporal variability in BMI communities due to the habitat preferences of certain BMI taxa. Low richness, diversity, and high dominance of highly tolerant taxa across the site suggested long-term patterns of extreme variability in habitat conditions associated with flow cessation and drying were the primary control on BMI communities. Thus, the interactive effects of these controls may produce unexpected patterns in BMI community richness, diversity, and composition in relation to longitudinal patterns of groundwater discharge and flow persistence. These findings demonstrate the importance of considering the influence of heterogeneity in environmental conditions at multiple spatial and temporal scales when interpreting relationships between hydrological and abiotic or biotic ecological variable in streams with intermittent flow.