The CG9940 gene, which encodes the NAD+ synthase protein in Drosophila, is conserved in human, zebra fish, and mosquito. NAD+ synthase is a homodimer, which catalyzes the final step in de novo nicotinamide adenine dinucleotide (NAD+) biosynthesis, an amide transfer from either ammonia or glutamine to nicotinic acid adenine dinucleotide (NaAD). Both the CG9940 and exercise are closely relative to NAD+ level, and NAD+ plays important roles not only in energy metabolism and mitochondrial functions but also in aging. In our study, the expression of CG9940 was changed by UAS/GAL4 system in Drosophila. Flies were trained by a training device. Cardiac function was analyzed by M-mode traces, climbing index was measured through negative geotaxis assay, and lifespan was measured via lifespan assays. The important new findings from our present study included the following: (1) the expression of the CG9940 could affect cardiac function, mobility, and lifespan in Drosophila. Over-expression of the CG9940 gene had positive effects on Drosophila, such as enhanced aging cardiac output, reduced heart failure, delayed age-related mobility decline, and prolonged lifespan, but lower-expression of the CG9940 had negative effects on them. (2) Different expressions of the CG9940 resulted in different influences on the adaptation of cardiac function, mobility, and lifespan to exercise in aging Drosophila. Both normal-expression and over-expression of the CG9940 resulted in positive influences on the adaptation of cardiac functions, mobility, and lifespan to exercise in aging Drosophila such as exercise slowed age-related decline of cardiac function, mobility and extent of lifespan in these flies, while lower-expression of the CG9940 led to negative impacts on the adaptation of mobility and lifespan to exercise in Drosophila.