The dive response involves three main components - breath holding, reduced heart rate and increased peripheral vasoconstriction - and is ubiquitous during forced dives in air-breathing vertebrates; however, numerous studies in free-diving animals have shown that the heart rate response to diving varies considerably in a manner that suggests cognitive control. Furthermore, studies on free-diving animals and controlled experiments in trained animals both indicate that the dive response can be conditioned, such that the reduction in heart rate begins before submergence and the extent of the reduction is set early in the dive. In addition, numerous species also experience an increase in heart rate and blood flow during ascent at the end of a dive, a phenomenon commonly called 'ascent tachycardia'. Collectively, these data suggest that although the dive response is under autonomic control, many species can vary its magnitude depending on the length and type of the planned dive - an indication of a role for cognition in the overall physiological responses associated with diving. Here, we provide examples of the conditioned cardiac responses - including anticipatory changes in heart rate - in several diving species and propose potential underlying mechanisms. We also discuss how the anticipatory cardiovascular responses not only improve diving capacity, but also prevent diving-related problems, such as decompression sickness or barotrauma, through a mechanism described by the selective gas exchange hypothesis.