Central regulation of cardiac output via the sympathetic and parasympathetic branches of the autonomic nervous system allows the organism to respond to environmental changes. Sudden onset stimuli, startle stimuli, are useful probes to study central regulatory responses to the environment. In mammals, startle stimuli induce a transient bradycardia that habituates with repeated stimulation. Repeated presentation of the stimulus results in tachycardia. In this study, we investigate the behavioral regulation of heart rate in response to sudden stimuli in the zebrafish. Larval zebrafish show a stereotyped heart rate response to mild electrical shock. Naïve fish show a significant increase in interbeat interval that resolves in the 2 s following stimulation. This transient bradycardia decreases on repeated exposure to the stimulus. Following repeated stimulation, the fish become tachycardic within 1 min of stimulation. Both the transient bradycardia and following tachycardia responses are blocked with administration of the ganglionic blocker hexamethonium, demonstrating that these responses are mediated centrally. The transient bradycardia is blocked by the muscarinic antagonist atropine, suggesting that this response is mediated by the parasympathetic system, while the following tachycardia is specifically blocked by the beta-adrenergic antagonist propranolol, suggesting that this response is mediated by the sympathetic nervous system. Together, these results demonstrate that at the larval stage, zebrafish actively regulate cardiac output to changes in their environment using both the parasympathetic and sympathetic branches of the autonomic nervous system, a behavioral response that is markedly similar to that observed in mammals to similar sudden onset stimuli.