Macroinvertebrate communities are strongly influenced by hydrological variability in surface waters. However, the response of these communities in corresponding groundwater-dependent habitats is not well understood. This study characterised the macroinvertebrate fauna and physicochemical characteristics of a chalk aquifer and its river in southern England. Samples were collected over one year from three perennial and two temporary paired benthic-hyporheic sites and seven phreatic sites in the surrounding aquifer. The study was preceded by a period of below average rainfall, providing an opportunity to assess the response of macroinvertebrate communities to unseasonal declines in river discharge and groundwater levels. Benthic, hyporheic and phreatic habitats each supported a distinct macroinvertebrate community, with the hyporheic habitat supporting both epigean taxa and stygofauna. As discharge declined, the composition of these communities changed. In particular, the abundance of the epigean amphipod Gammarus pulex was higher in hyporheic than benthic habitats during periods of low surface discharge, suggesting potential refuge-seeking behaviour. Similarly, fluctuations in the abundance and distribution of two stygofauna, Crangonyx subterraneus and Niphargus fontanus, coincided with marked changes in groundwater levels, suggesting that the contraction of available habitat and changes in connectivity also influenced the phreatic community. The variable distribution of macroinvertebrates between these habitats, especially in response to hydrological variability, suggests a dynamic connection between the river and its aquifer. This connection is an important consideration for the assessment and conservation management of both surface and groundwater communities and may help to underpin integrated, catchment-based environmental management, especially in river systems with temporary reaches.