Understanding complex relations between neuronal activity and animal behavior is one of the most crucial questions in neuroscience. Rapid advancements in Machine Learning (ML) methods offer new powerful tools that can be used to investigate highly non-linear mapping between motor cortex activity and body movements. Here, by using explainable convolutional network (ConvNet) and Generative Adversarial Networks (GAN), we show how neuronal activity can be predicted from raw videos of animal behavior, and interestingly, we show that detailed videos of behaving animals can be recreated from activity of just few selected neurons. Those analyses revealed that the predictability of behavior from neuronal activity (and vice versa) initially increases as an animal learns a new task. However, after the animal performance on a motor task achieves the required accuracy, then “coupling” between neuronal activity and behavior decreases, without degrading task performance. In summary, we show how new ML methods could be applied to provide new insights in the relation between neuronal activity and behavior.