Melatonin is a hormone that is critical for normal circadian and seasonal rhythmicity in a wide range of different animals. It is a powerful antioxidant commonly used to prevent reperfusion injury to the heart after infarction. We show here it has other more far-reaching effects on cardiac function. Using the Drosophila model, we show that injection of melatonin increases the regularity of heartbeat significantly and can rescue rhythmicity in flies bearing mutations that adversely affect cardiac function. Notably, melatonin increases cardiac regularity independent of alteration of heart rate. We provide compelling evidence that melatonin's action as an antioxidant is not the mechanism underlying improved cardiac performance. We have strong evidence that melatonin's action on the heart is mediated via a specific G-Protein-coupled receptor encoded by the CG 4313 gene that our results implicate as a candidate melatonin receptor. These results open a line of questioning about fundamental aspects of cardiac pacemaking.