The motor imagery brain–computer interface (MI-BCI) system is currently one of the most advanced rehabilitation technologies, and it can be used to restore the motor function of stroke patients. The deep learning algorithms in the MI-BCI system require lots of training samples, but the electroencephalogram (EEG) data of stroke patients is quite scarce. Therefore, the expansion of EEG data has become an important part of stroke clinical rehabilitation research. In this paper, a deep convolution generative adversarial network (DCGAN) model is proposed to generate artificial EEG data and further expand the scale of the stroke dataset. First, multichannel one-dimensional EEG data is converted into a two-dimensional EEG spectrogram using EEG2Image based on the modified S-transform. Then, DCGAN is used to artificially generate EEG data based on MI. Finally, the validity of the generated artificial EEG data is proved. This paper preliminarily indicates that generating artificial stroke data is a promising strategy, which contributes to the further development of stroke clinical rehabilitation.