While ocean acidification is predicted to threaten marine biodiversity, the processes that directly impact species persistence are not well understood. For marine species, early life history stages are inherently vulnerable to predators and an innate ability to detect predators can be critical for survival. However, whether or not acidification inhibits predator detection is unknown. Here, we show that newly hatched larvae of the marine fish Amphiprion percula innately detect predators using olfactory cues and this ability is retained through to settlement. Aquarium-reared larvae, not previously exposed to predators, were able to distinguish between the olfactory cues of predatory and non-predatory species. However, when eggs and larvae were exposed to seawater simulating ocean acidification (pH 7.8 and 1000 p.p.m. CO2) settlement-stage larvae became strongly attracted to the smell of predators and the ability to discriminate between predators and non-predators was lost. Newly hatched larvae were unaffected by CO2 exposure and were still able to distinguish between predatory and non-predatory fish. If this impairment of olfactory preferences in settlement-stage larvae translates to higher mortality as a result of increased predation risk, there could be direct consequences for the replenishment and the sustainability of marine populations.