Deep brain nuclei are closely related to the pathogenesis of neurodegenerative diseases. Automatic segmentation for brain nuclei plays a significant role in aging and disease-related assessment. Quantitative susceptibility mapping (QSM), as a novel MRI imaging technique, attracts increasing attention in deep gray matter (DGM) nuclei-related research and diagnosis. This paper proposes DeepQSMSeg, a deep learning-based end-to-end tool, to segment five pairs of DGM structures from QSM images. The proposed model is based on a 3D encoder-decoder fully convolutional neural network. For concentrating network on the target regions, spatial and channel attention modules are adopted in both encoder and decoder stages. Dice loss is combined with focal loss to alleviate the imbalance of ROI classes. The result shows that our method can segment DGM structures from QSM images precisely, rapidly and reliably. Comparing with ground truth, the average Dice coefficient for all ROIs in the test dataset achieved 0.872±0.053, and Hausdorff distance was 2.644±2.917 mm. Finally, an age-related susceptibility development model was used to confirm the reliability of DeepQSMSeg in aging and disease-related studies.Clinical Relevance—Accurate and automatic segmentation tool for sub-cortical regions in QSM can significantly alleviate the pressure of radiologists. It can also accelerate the progress of related research and clinical translation.