Social animals live and move through spaces shaped by the presence, motion and sensory cues of multiple other individuals1–6. Neural activity in the hippocampus is known to reflect spatial behaviour7–9 yet its study is lacking in such dynamic group settings, which are ubiquitous in natural environments. Here we studied hippocampal activity in groups of bats engaged in collective spatial behaviour. We find that, under spontaneous conditions, a robust spatial structure emerges at the group level whereby behaviour is anchored to specific locations, movement patterns and individual social preferences. Using wireless electrophysiological recordings from both stationary and flying bats, we find that many hippocampal neurons are tuned to key features of group dynamics. These include the presence or absence of a conspecific, but not typically of an object, at landing sites, shared spatial locations, individual identities and sensory signals that are broadcasted in the group setting. Finally, using wireless calcium imaging, we find that social responses are anatomically distributed and robustly represented at the population level. Combined, our findings reveal that hippocampal activity contains a rich representation of naturally emerging spatial behaviours in animal groups that could in turn support the complex feat of collective behaviour.