A team was able to make the mice wrongly associate a benign environment with a previous unpleasant experience from different surroundings.
The researchers conditioned a network of neurons to respond to light, making the mice recall the unpleasant environment.
Reporting in Science, they say it could one day shed light into how false memories occur in humans.
The brains of genetically engineered mice were implanted with optic fibres in order to deliver pulses of light to their brain. Known as optogenetics, this technique is able to make individual neurons respond to light.