When you perceive or remember something, other related things come to mind, affecting how these competing items are subsequently perceived and remembered. Such behavioural consequences are believed to result from changes in the overlap of neural representations of these items, especially in the hippocampus. According to multiple theories, hippocampal overlap should increase (integration) when there is high coactivation between cortical representations. However, prior studies used indirect proxies for coactivation by manipulating stimulus similarity or task demands. Here, we induce coactivation in visual cortex more directly using closed-loop neurofeedback from real-time functional magnetic resonance imaging (fMRI). While viewing one object, participants were rewarded for activating the representation of another object as strongly as possible. Across multiple real-time fMRI sessions, participants succeeded in using this neurofeedback to increase coactivation. Compared with a baseline of untrained objects, this protocol led to memory integration in behaviour and the brain: the trained objects became harder for participants to discriminate behaviourally in a categorical perception task and harder to discriminate neurally from patterns of fMRI activity in their hippocampus as a result of losing unique features. These findings demonstrate that neurofeedback can be used to alter and combine memories.This article is part of the theme issue 'Neurofeedback: new territories and neurocognitive mechanisms of endogenous neuromodulation'.