Habitat degradation is a key factor leading to the global loss of biodiversity. This problem is particularly acute in coral reef ecosystems. We investigated whether recognition of predator odours by damselfish was influenced by coral degradation and whether these changes altered survival in the wild. We taught whitespot damselfish to recognize the odour of a predator in the presence of live/healthy coral or dead/degraded coral. Fish were tested for a response to predator odours in environments that matched their conditioning environment or in environments that were mismatched. Next, we taught blue damselfish to recognize the odour of three common reef predators in live and degraded coral environments and then stocked them onto live or degraded patch reefs, where we monitored their subsequent response to predator odour along with their survival. Damselfish learned to recognize predator odours in both coral environments, but the intensity of their antipredator response was much greater when the conditioning and test environments matched. Fish released on degraded coral had about 50% higher survival if they had been trained in the presence of degraded coral rather than live coral. Altering the intensity of antipredator responses could have rather profound consequences on population growth.