Biofilm formation is a common adaptation for microbes in energy-limited conditions such as those prevalent in the vast deep terrestrial biosphere. However, due to the low biomass and the inaccessible nature of subsurface groundwaters, the microbial populations and genes involved in its formation are understudied. Here, a flow-cell system was designed to investigate biofilm formation under in situ conditions in two groundwaters of contrasting age and geochemistry at the Äspö Hard Rock Laboratory, Sweden. Metatranscriptomes showedThiobacillus,Sideroxydans, andDesulforegulato be abundant and together accounted for 31% of the transcripts in the biofilm communities. Differential expression analysis highlightedThiobacillusto have a principal role in biofilm formation in these oligotrophic groundwaters by being involved in relevant processes such as the formation of extracellular matrix, quorum sensing, and cell motility. The findings revealed an active biofilm community with sulfur cycling as a prominent mode of energy conservation in the deep biosphere.