The high potential for creating brain-computer interfaces (BCIs) and video games for upper limb rehabilitation has been demonstrated in recent years. In this work, we describe the implementation of a prototype BCI with feedback based on a virtual environment to control the lateral movement of a character by predicting the subject’s motor intention. The electroencephalographic signals were processed employing a Finite Impulse Response (FIR) filter, Common Spatial Patterns (CSP), and Linear Discriminant Analysis (LDA). Also, a video game was used as a virtual environment, which was written in C# on the Unity3D platform. The test results showed that the prototype implemented based on electroencephalographic signal acquisition has the potential to take on real-time applications such as avatar control or assistive devices, obtaining a maximum control time of 65 s. In addition, it was noticed that the feedback in an interface plays a crucial role, since it helps the person not only to feel motivated, but also to learn how to have a more consistent motor intention and when little calibration data is recorded, the probability that the system makes erroneous predictions increases. These results demonstrate the usefulness of the development as support for people who require some treatment in the form of upper limb motor rehabilitation, and that the use of virtual environments, such as video games, can motivate such people during the rehabilitation processes.