Inter-individual variation in the propensity to perform different tasks is thought to contribute significantly to the success of group-living organisms. Animals show consistent behavioural differences among them, referred to as animal personality, which are likely an important evolutionary driver in animal societies through their influences on collective actions and thus how these organisms interact with their environment. At present, however, we have little understanding of the proximate mechanisms underlying animal personality in animal groups. In this study, we use a comparative gene expression approach to investigate the mechanistic basis for personality variation during collective behaviour in a species with rudimentary societies: the American cockroach. Our analyses reveal clear differences in gene expression between behavioural phenotypes with tendencies for short and long sheltering time. We discuss how the patterns of gene expression might explain the behavioural differences between individual phenotypes, and by extension how this might influence the collective performance of cockroach groups. Our results shed new light on the molecular mechanisms underlying differences in aggressiveness, dominance and behavioural plasticity in insect societies, and indicate cockroaches may be a valuable model for the study of genetic mechanisms underlying the early steps in the evolution of social behaviour and social complexity.