Abstract Discriminating patterns of brain activity corresponding to multiple hand movements are a challenging problem at the limit of the spatial resolution of magnetoencephalography (MEG). Here, we use the combination of MEG, a novel experimental paradigm, and a recently developed convolutional-neural-network-based classifier to demonstrate that four goal-directed real and imaginary movements—all performed by the same hand—can be detected from the MEG signal with high accuracy: >70% for real movements and >60% for imaginary movements. Additional experiments were used to control for possible confounds and to establish the empirical chance level. Investigation of the patterns informing the classification indicated the primary contribution of signals in the alpha (8–12 Hz) and beta (13–30 Hz) frequency range in the contralateral motor areas for the real movements, and more posterior parieto–occipital sources for the imagined movements. The obtained high accuracy can be exploited in practical applications, for example, in brain–computer interface-based motor rehabilitation.