Spinal cord segmentation is the first step in atlas-based spinal cord image analysis, but segmentation of compressed spinal cords from patients with degenerative cervical myelopathy is challenging. We applied convolutional neural network models to segment the spinal cord from T2-weighted axial magnetic resonance images of DCM patients. Furthermore, we assessed the correlation between the cross-sectional area segmented by this network and the neurological symptoms of the patients. The CNN architecture was built using U-Net and DeepLabv3 + and PyTorch. The CNN was trained on 2762 axial slices from 174 patients, and an additional 517 axial slices from 33 patients were held out for validation and 777 axial slices from 46 patients for testing. The performance of the CNN was evaluated on a test dataset with Dice coefficients as the outcome measure. The ratio of CSA at the maximum compression level to CSA at the C2 level, as segmented by the CNN, was calculated. The correlation between the spinal cord CSA ratio and the Japanese Orthopaedic Association score in DCM patients from the test dataset was investigated using Spearman's rank correlation coefficient. The best Dice coefficient was achieved when U-Net was used as the architecture and EfficientNet-b7 as the model for transfer learning. Spearman's rs between the spinal cord CSA ratio and the JOA score of DCM patients was 0.38 (p = 0.007), showing a weak correlation. Using deep learning with magnetic resonance images of deformed spinal cords as training data, we were able to segment compressed spinal cords of DCM patients with a high concordance with expert manual segmentation. In addition, the spinal cord CSA ratio was weakly, but significantly, correlated with neurological symptoms. Our study demonstrated the first steps needed to implement automated atlas-based analysis of DCM patients.