Cultural norms, collective decisions, reproductive behaviour, and pathogen transmission all emerge from interaction patterns within animal social groups. These patterns of interaction support group-level phenomena that can influence an individual's fitness.The aim of this study is to understand the evolution of social organization in Drosophila.Using a comparative ecological, phylogenetic and behavioural approach, we studied the different properties of social interaction networks (SINs) formed by 20 drosophilids and the different ways these species interact. We investigate whether animal network structures arise from common ancestry, a response to the species' past ecological environment, other social behaviours, or a combination of these factors. We demonstrate that differences in past climate predicted the species' current SIN properties. The drosophilid phylogeny offered no value to predicting species' differences in SINs through phylogenetic signal tests. This suggests group-level social behaviours in drosophilid species are shaped by divergent climates. However, we find that the distance at which flies interact correlated with the drosophilid phylogeny, indicating that behavioural elements that comprise SINs have remained largely unchanged in their recent evolutionary history. We find a significant correlation of leg length to social distance, outlining the interdependence of anatomy and complex social structures.Although SINs display a complex evolutionary relationship across drosophilids, this study provides evidence of selective pressures acting on social behaviour in Drosophila.We speculate that conserved molecular mechanisms may be shared across drosophilids deep in their evolutionary history, similar to other pervasive mechanisms, like biological clocks.