Collective motion by animal groups can emerge from simple rules that govern each individual's interactions with its neighbours. Studies of extant species have shown how such rules yield coordinated group behaviour, but little is known of their evolutionary origins or whether extinct group-living organisms used similar rules. Here, we report evidence consistent with coordinated collective motion in a fossilized group of the extinct fish Erismatopterus levatus†, and we infer possible behavioural rules that underlie it. We found traces of two rules for social interaction similar to those used by extant fishes: repulsion from close individuals and attraction towards neighbours at a distance. Moreover, the fossilized fish showed group-level structures in the form of oblong shape and high polarization, both of which we successfully reproduced in simulations incorporating the inferred behavioural rules. Although it remains unclear how the fish shoal's structure was preserved in the fossil, these findings suggest that fishes have been forming shoals by combining sets of simple behavioural rules since at least the Eocene. Our study highlights the possibility of exploring the social communication of extinct animals, which has been thought to leave no fossil record.