Electrical stimulation is a promising tool for modulating brain networks. However, it is unclear how stimulation interacts with neural patterns underlying behavior. Specifically, how might external stimulation that is not sensitive to the state of ongoing neural dynamics reliably augment neural processing and improve function? Here, we tested how low-frequency epidural alternating current stimulation (ACS) in non-human primates recovering from stroke interacted with task-related activity in perilesional cortex and affected grasping. We found that ACS increased co-firing within task-related ensembles and improved dexterity. Using a neural network model, we found that simulated ACS drove ensemble co-firing and enhanced propagation of neural activity through parts of the network with impaired connectivity, suggesting a mechanism to link increased co-firing to enhanced dexterity. Together, our results demonstrate that ACS restores neural processing in impaired networks and improves dexterity following stroke. More broadly, these results demonstrate approaches to optimize stimulation to target neural dynamics.