Obesity is rising globally and is associated with neurodevelopmental and psychiatric disorders among children, adolescents, and young adults. Whether obesity is the cause or the consequence of these disorders remains unclear. To examine the behavioural effects of obesity systematically, locomotion, anxiety, and social behaviour were assessed in male and female C57Bl/6J mice using the open field (OF), elevated plus maze (EPM) and social preference (SP) task. First, the effects of age, sex and prior exposure to the tasks were examined in control mice, before investigating post-weaning consumption of a high fat, high sugar (HFHS) diet commonly consumed in human populations with high rates of obesity. In the OF and EPM, locomotor activity and anxiety-related behaviours were reduced by age in both sexes, but with different sex-specific profiles. Prior exposure to the tasks reduced locomotion in the OF in a sex-specific manner but had little effect on behaviour in the EPM in either sex. The HFHS diet reduced food and calorie intake and increased body mass and fat deposition in both sexes. In the OF, both male and female HFHS mice showed reduced locomotion, whereas, in the EPM, only HFHS female mice displayed reduced anxiety-related behaviours. Both male and female HFHS mice had a significantly higher SP index than controls. Collectively, the findings demonstrate that the behavioural effects of age, prior exposure and of diet-induced obesity all depend on the sex of the mouse. This emphasises the importance of including both sexes when assessing behavioural phenotypes arising from dietary manipulations.