Methods and systems are provided for triggering electrical stimulation of a spinal cord during execution of a motor event. In one example, a method comprises monitoring motor cortex activity while execution of a desired motor movement is attempted during a first mode where one or more nerve fibers are not stimulated, and during a second mode where the one or more nerve fibers are stimulated. Delivery timing of electrical stimulation may be closed-loop controlled based on current motor cortex activity and the motor cortex activity recorded previously during both the first and second modes.