The relationship between the integrity of white matter tracts and cortical function in the human brain remains poorly understood. Here we use a model of reversible white matter injury, compression of the optic chiasm by tumors of the pituitary gland, to study the structural and functional changes that attend spontaneous recovery of cortical function and visual abilities after surgical tumor removal and subsequent decompression of the nerves. We show that compression of the optic chiasm leads to demyelination of the optic tracts, which reverses as quickly as 4 weeks after nerve decompression. Furthermore, variability across patients in the severity of demyelination in the optic tracts predicts visual ability and functional activity in early cortical visual areas, and pre-operative measurements of myelination in the optic tracts predicts the magnitude of visual recovery after surgery. These data indicate that rapid regeneration of myelin in the human brain is a significant component of the normalization of cortical activity, and ultimately the recovery of sensory and cognitive function, after nerve decompression. More generally, our findings demonstrate the utility of diffusion tensor imaging as an in vivo measure of myelination in the human brain.