Gait disorders are common in the course of dementia, even at the stage of mild cognitive impairment, owing to probable changes in higher levels of motor control. Since motor control message is ultimately supported in the brain by the primary motor cortex and since cortical lesions are frequent in the dementia process, we hypothesized that impairments of the primary motor cortex may explain the early gait disorders observed in mild cognitive impairment. Our purpose was to determine whether the neurochemistry of the primary motor cortex measured with proton magnetic resonance spectroscopy, and its volume, were associated with gait performance while single and dual-tasking in mild cognitive impairment. Twenty community dwellers with mild cognitive impairment, aged 76 years (11) [median (interquartile range)] (30% female) from the 'Gait and Brain Study' were included in this analysis. Gait velocity and stride time variability were measured while single (i.e. walking alone) and dual tasking (i.e. walking while counting backwards by seven) using an electronic walkway (GAITRite System). Ratios of N-acetyl aspartate to creatine and choline to creatine and cortical volume were calculated in the primary motor cortex. Participants were categorized according to median N-acetyl aspartate to creatine and choline to creatine ratios. Age, gender, body mass index, cognition, education level and subcortical vascular burden were used as potential confounders. Participants with low N-acetyl aspartate to creatine (n = 10) had higher (worse) stride time variability while dual tasking than those with high N-acetyl aspartate to creatine (P = 0.007). Those with high choline to creatine had slower (worse) gait velocity while single (P = 0.015) and dual tasking (P = 0.002). Low N-acetyl aspartate to creatine was associated with increased stride time variability while dual tasking (adjusted β = 5.51, P = 0.031). High choline to creatine was associated with slower gait velocity while single (adjusted β = -26.56, P = 0.009) and dual tasking (adjusted β = -41.92, P = 0.022). Cortical volume correlated with faster gait velocity while single (P = 0.029) and dual tasking (P = 0.037), and with decreased stride time variability while single tasking (P = 0.034). Finally, the probability of exhibiting abnormal metabolite ratios in the primary motor cortex was 63% higher among participants with major gait disturbances in dual task. Those with compromised gait velocity in dual task had a 2.05-fold greater risk of having a smaller cortical volume. In conclusion, the neurochemistry and volume of the primary motor cortex were associated with gait performance while single and dual tasking. Stride time variability was mainly sensitive to neuronal function (N-acetyl aspartate to creatine), whereas gait velocity was more affected by inflammatory damage (choline to creatine) and volumetric changes. These findings may contribute to a better understanding of the higher risks of mobility decline and falls in subjects with mild cognitive impairment.