Non-invasive and invasive electrical neurostimulation are promising tools to better understand brain function and ultimately treat its malfunction. In current open-loop approaches, a clinician chooses a fixed set of stimulation parameters, informed by observed therapeutic benefits and previous empirical evidence. However, this procedure leads to a large intra- and inter-subject variability often introducing side-effects and low effect sizes. Closed-loop electrical neurostimulation (CLENS) approaches strive to alleviate these limitations by tailoring the stimulation parameters to an ongoing electrophysiological biomarker. Here, we review the current status of closed-loop, supraspinal electrical stimulation in humans, presenting our vision of potential control frameworks, and support the idea of creating synergies with the field of brain-machine interfacing. Finally, we pinpoint two pivotal challenges that, in our view, need to be overcome for this technology to become a reality: dealing with the electrical stimulation artifacts, and dissociating the pathological from physiological information within the targeted biomarker.