Rivers are the “tip of the iceberg”, with the underlying groundwater being the unseen freshwater majority. Microbial community composition and the dynamics of shallow groundwater ecosystems are thus crucial, due to their potential impact on ecosystem processes and functioning. In early summer and late autumn, samples of river water from 14 stations and groundwater from 45 wells were analyzed along a 300 km transect of the Mur River valley, from the Austrian alps to the flats at the Slovenian border. The active and total prokaryotic communities were characterized using high-throughput gene amplicon sequencing. Key physico-chemical parameters and stress indicators were recorded. The dataset was used to challenge ecological concepts and assembly processes in shallow aquifers. The groundwater microbiome is analyzed regarding its composition, change with land use, and difference to the river. Community composition and species turnover differed significantly. At high altitudes, dispersal limitation was the main driver of groundwater community assembly, whereas in the lowland, homogeneous selection explained the larger share. Land use was a key determinant of the groundwater microbiome composition. The alpine region was more diverse and richer in prokaryotic taxa, with some early diverging archaeal lineages being highly abundant. This dataset shows a longitudinal change in prokaryotic communities that is dependent on regional differences affected by geomorphology and land use.