Background: As cognitive decline and dementia‐related diseases are currently incurable, identifying modifiable and preventative factors is imperative. Thus, we aimed to investigate the associations between modifiable lifestyle factors and cognitive function in a population‐based sample of nondemented men.Methods: Data for 537 men were drawn from the ongoing, population‐based, Geelong Osteoporosis Study (GOS). The CogState Brief Battery (CBB) was utilised to determine cognitive function (overall cognitive function [OCF], psychomotor function, attention, working memory, and visual learning). Demographic and lifestyle factors (diet, smoking, physical activity [sport, work/home, and leisure time], alcohol use, and body mass index [BMI]) were self‐reported and documented across three waves of data collection. Generalised estimating equation (GEE) models were used to determine associations between the time‐updating exposures of interest and each of the cognitive domains.Results: Age was associated with OCF (η2 = 0.298), psychomotor function (η2 = 0.163), attention (η2 = 0.210), working memory (η2 = 0.215), and visual learning (η2 = 0.097). Playing sport was associated with all aspects of cognition: OCF (η2 = 0.014), psychomotor function (η2 = 0.007), attention (η2 = 0.004), working memory (η2 = 0.013), and visual learning (η2 = 0.004), and being physically active during leisure time was associated with visual learning (η2 = 0.008). Being physically active at work and home, smoking, diet quality, energy consumed per day, alcohol intake, and BMI were not associated with any of the cognitive domains.Conclusion: In this study of nondemented men, elements of a healthy lifestyle such as playing sport and being physically active during leisure time were associated with better cognition. Further studies into whether these factors, amongst others, prevent the onset and progression of dementia are needed.