Drosophila melanogaster is a good model species for the study of heart function. However, most previous work on D. melanogaster heart function has focused on the effects of large-effect genetic variants. We compare heart function among 18 D. melanogaster populations that have been selected for altered development time, aging, or stress resistance. We find that populations with faster development and faster aging have increased heart dysfunction, measured as percentage heart failure after electrical pacing. Experimental evolution of different triglyceride levels, by contrast, has little effect on heart function. Evolved differences in heart function correlate with allele frequency changes at many loci of small effect. Genomic analysis of these populations produces a list of candidate loci that might affect cardiac function at the intersection of development, aging, and metabolic control mechanisms.