Abstract Background Midlife risk factors such as Type 2 Diabetes Mellitus (T2DM) confer a significantly increased risk of cognitive impairment in later life, with executive function, memory and attention domains often affected first. Spatiotemporal gait characteristics are increasingly recognised as biomarkers of neurocognitive function and later dementia risk. Methods Using an automated walkway, 24 spatiotemporal gait parameters were examined across 5 domains of gait previously linked to cognitive function on usual-pace, maximal-pace, and cognitive dual-task gait conditions. Neurocognitive function was measured using a neuropsychological assessment battery. Linear regression was used assess the relationship between each gait parameter across the three walks and cognitive function. Results 102 middle-aged adults underwent assessment, 65 with uncomplicated T2DM (57.5 ± 8.0 years; 40% female) and 37 healthy controls (57.0 ± 8.3 years; 62.1% female). T2DM was associated with significant changes in gait phases and rhythm domains at usual-pace, and greater gait variability observed during maximal-pace and dual-task. In the overall cohort, both gait pace and rhythm domains were associated with memory and executive function during usual pace walking. At maximal-pace, gait pace parameters were associated with reaction time and delayed memory. During the cognitive dual-task, associations between gait variability and delayed memory and executive function were observed. Associations persisted following covariate adjustment and did not differ by T2DM status. Conclusion This supports the use of spatiotemporal gait as an integrative biomarker of neurocognitive function in otherwise healthy middle-aged individuals. Discrete associations were seen between both differing gait tasks and gait domains with domain-specific neuropsychological performance. Employing both maximal-pace and dual-task paradigms, in addition to single-task usual-pace gait, may be important in cognitively unimpaired populations with risk factors for later cognitive decline - with the aim of identifying individuals who may benefit most from potential preventative interventions.