Hearing loss is associated with poor cognitive performance and incident dementia and may contribute to cognitive decline. Treating hearing loss with hearing aids may ameliorate cognitive decline. The purpose of this study was to test whether use of hearing aids was associated with better cognitive performance and if this relationship was mediated via social isolation and/or depression. Structural equation modelling of associations between hearing loss, cognitive performance, social isolation, depression and hearing aid use was carried out with a subsample of the UK Biobank data set (n = 164,770) of UK adults aged 40 to 69 years who completed a hearing test. Age, sex, general health and socioeconomic status were controlled for as potential confounders. Hearing aid use was associated with better cognition, independently of social isolation and depression. This finding was consistent with the hypothesis that hearing aids may improve cognitive performance, although if hearing aids do have a positive effect on cognition it is not likely to be via reduction of the adverse effects of hearing loss on social isolation or depression. We suggest that any positive effects of hearing aid use on cognition may be via improvement in audibility or associated increases in self-efficacy. Alternatively, positive associations between hearing aid use and cognition may be accounted for by more cognitively able people seeking and using hearing aids. Further research is required to determine the direction of association, if there is any direct causal relationship between hearing aid use and better cognition, and whether hearing aid use results in reduction in rates of cognitive decline measured longitudinally.