•Intracranial brain stimulation has variable effects on episodic memory performance
•Stimulation increased memory performance when delivered in poor encoding states
•Recall-related brain activity increased after stimulation of poor encoding states
•Neural activity linked to contextual memory predicted encoding state modulationSummary
People often forget information because they fail to effectively encode it. Here, we test the hypothesis that targeted electrical stimulation can modulate neural encoding states and subsequent memory outcomes. Using recordings from neurosurgical epilepsy patients with intracranially implanted electrodes, we trained multivariate classifiers to discriminate spectral activity during learning that predicted remembering from forgetting, then decoded neural activity in later sessions in which we applied stimulation during learning. Stimulation increased encoding-state estimates and recall if delivered when the classifier indicated low encoding efficiency but had the reverse effect if stimulation was delivered when the classifier indicated high encoding efficiency. Higher encoding-state estimates from stimulation were associated with greater evidence of neural activity linked to contextual memory encoding. In identifying the conditions under which stimulation modulates memory, the data suggest strategies for therapeutically treating memory dysfunction.