There is increasing concern that ocean acidification, caused by the uptake of additional CO2 at the ocean surface, could affect the functioning of marine ecosystems; however, the mechanisms by which population declines will occur have not been identified, especially for noncalcifying species such as fishes. Here, we use a combination of laboratory and field-based experiments to show that levels of dissolved CO2 predicted to occur in the ocean this century alter the behavior of larval fish and dramatically decrease their survival during recruitment to adult populations. Altered behavior of larvae was detected at 700 ppm CO2, with many individuals becoming attracted to the smell of predators. At 850 ppm CO2, the ability to sense predators was completely impaired. Larvae exposed to elevated CO2 were more active and exhibited riskier behavior in natural coral-reef habitat. As a result, they had 5-9 times higher mortality from predation than current-day controls, with mortality increasing with CO2 concentration. Our results show that additional CO2 absorbed into the ocean will reduce recruitment success and have far-reaching consequences for the sustainability of fish populations.