Analysis of hippocampal neural ensembles reveals unique codes for memory. Nonlinear analysis of ensemble codes can predict correct or erroneous behaviors. Electrical microstimulation of CA1 neurons can facilitate behavior and reduce errors. Results provide a proof-of-concept for a prosthetic to restore human memory.