A human's ability to adapt and learn relies on reflecting on past performance. Such reflections form latent factors called internal states that induce variability of movement and behavior to improve performance. Internal states are critical for survival, yet their temporal dynamics and neural substrates are less understood. Here, we link internal states with motor performance and neural activity using state-space models and local field potentials captured from depth electrodes in over 100 brain regions. Ten human subjects performed a goal-directed center-out reaching task with perturbations applied to random trials, causing subjects to fail goals and reflect on their performance. Using computational methods, we identified two internal states, indicating that subjects kept track of past errors and perturbations, that predicted variability in reaction times and speed errors. These states granted access to latent information indicative of how subjects strategize learning from trial history, impacting their overall performance. We further found that large-scale brain networks differentially encoded these internal states. The dorsal attention network encoded past errors in frequencies above 100 Hz, suggesting a role in modulating attention based on tracking recent performance in working memory. The default network encoded past perturbations in frequencies below 15 Hz, suggesting a role in achieving robust performance in an uncertain environment. Moreover, these networks more strongly encoded internal states and were more functionally connected in higher performing subjects, whose learning strategy was to respond by countering with behavior that opposed accumulating error. Taken together, our findings suggest large-scale brain networks as a neural basis of strategy. These networks regulate movement variability, through internal states, to improve motor performance.