Brain-machine interfaces (BMIs) based on motor imagery (MI) for controlling lower-limb exoskeletons during the gait have been gaining importance in the rehabilitation field. However, these MI-BMI are not as precise as they should. The detection of error related potentials (ErrP) as a self-tune parameter to prevent wrong commands could be an interesting approach to improve their performance. For this reason, in this investigation ErrP elicited by the movement of a lower-limb exoskeleton against subject's will is analyzed in the time, frequency and time-frequency domain and compared with the cases where the exoskeleton is correctly commanded by motor imagery (MI). The results of the ErrP study indicate that there is statistical significative evidence of a difference between the signals in the erroneous events and the success events. Thus, ErrP could be used to increase the accuracy of BMIs which commands exoskeletons.Clinical Relevance- This investigation has the purpose of improving brain-machine interfaces (BMIs) based on motor imagery (MI) by means of the detection of error potentials. This could promote the adoption of robotic exoskeletons commanded by BMIs in rehabilitation therapies.