Cortical lesions constitute a key manifestation of multiple sclerosis and contribute to clinical disability and cognitive impairment. Yet it is unknown whether local cortical lesions and cortical lesion subtypes contribute to domain-specific impairments attributable to the function of the lesioned cortex. In this cross-sectional study, we assessed how cortical lesions in the primary sensorimotor hand area relate to corticomotor physiology and sensorimotor function of the contralateral hand. Fifty relapse-free patients with relapsing-remitting or secondary-progressive multiple sclerosis and 28 healthy age- and sex-matched participants underwent whole-brain 7 T MRI to map cortical lesions. Brain scans were also used to estimate normalized brain volume, pericentral cortical thickness, white matter lesion fraction of the corticospinal tract, infratentorial lesion volume and the cross-sectional area of the upper cervical spinal cord. We tested sensorimotor hand function and calculated a motor and sensory composite score for each hand. In 37 patients and 20 healthy controls, we measured maximal motor-evoked potential amplitude, resting motor threshold and corticomotor conduction time with transcranial magnetic stimulation and the N20 latency from somatosensory-evoked potentials. Patients showed at least one cortical lesion in the primary sensorimotor hand area in 47 of 100 hemispheres. The presence of a lesion was associated with worse contralateral sensory (P = 0.014) and motor (P = 0.009) composite scores. Transcranial magnetic stimulation of a lesion-positive primary sensorimotor hand area revealed a decreased maximal motor-evoked potential amplitude (P < 0.001) and delayed corticomotor conduction (P = 0.002) relative to a lesion-negative primary sensorimotor hand area. Stepwise mixed linear regressions showed that the presence of a primary sensorimotor hand area lesion, higher white-matter lesion fraction of the corticospinal tract, reduced spinal cord cross-sectional area and higher infratentorial lesion volume were associated with reduced contralateral motor hand function. Cortical lesions in the primary sensorimotor hand area, spinal cord cross-sectional area and normalized brain volume were also associated with smaller maximal motor-evoked potential amplitude and longer corticomotor conduction times. The effect of cortical lesions on sensory function was no longer significant when controlling for MRI-based covariates. Lastly, we found that intracortical and subpial lesions had the largest effect on reduced motor hand function, intracortical lesions on reduced motor-evoked potential amplitude and leucocortical lesions on delayed corticomotor conduction. Together, this comprehensive multilevel assessment of sensorimotor brain damage shows that the presence of a cortical lesion in the primary sensorimotor hand area is associated with impaired corticomotor function of the hand, after accounting for damage at the subcortical level. The results also provide preliminary evidence that cortical lesion types may affect the various facets of corticomotor function differentially.