On and within most sites across an animal's body live complex communities of microorganisms. These microorganisms perform a variety of important functions for their hosts, including communicating with the brain, immune system and endocrine axes to mediate physiological processes and affect individual behaviour. Microbiome research has primarily focused on the functions of the microbiome within the gastrointestinal tract (gut microbiome) using biomedically relevant laboratory species (i.e. model organisms). These studies have identified important connections between the gut microbiome and host immune, neuroendocrine and nervous systems, as well as how these connections, in turn, influence host behaviour and health. Recently, the field has expanded beyond traditional model systems as it has become apparent that the microbiome can drive differences in behaviour and diet, play a fundamental role in host fitness and influence community-scale dynamics in wild populations. In this Review, we highlight the value of conducting hypothesis-driven research in non-model organisms and the benefits of a comparative approach that assesses patterns across different species or taxa. Using social behaviour as an intellectual framework, we review the bidirectional relationship between the gut microbiome and host behaviour, and identify understudied mechanisms by which these effects may be mediated.