Class IIa histone deacetylases (HDACs) critically regulate cardiac function through the repression of the activity of myocyte enhancer factor 2 (MEF2)-dependent gene programs. Protein kinase D (PKD) and Ca2+/Calmodulin-dependent kinase II (CaMKII) activate MEF2 by phosphorylating distinct HDAC isoforms and thereby creating 14-3-3 binding sites for nucleo-cytoplasmic shuttling. Recently, it has been shown that this process is counteracted by cyclic AMP (cAMP)-dependent signaling. Here, we investigated the specific mechanisms of how cAMP-dependent signaling regulates distinct HDAC isoforms and determined their relative contributions to the protection from pathological MEF2 activation. We found that cAMP is sufficient to induce nuclear retention and to blunt phosphorylation of the 14-3-3 binding sites of HDAC5 (Ser259/498) and HDAC9 (Ser218/448) but not HDAC4 (Ser246/467/632). These regulatory events could be observed only in cardiomyocytes and myocyte-like cells but not in non-myocytes, pointing to an indirect myocyte-specific mode of action. Consistent with one previous report, we found that blunted phosphorylation of HDAC5 and HDAC9 was mediated by protein kinase A (PKA)-dependent inhibition of PKD. However, we show by the use of neonatal cardiomyocytes derived from genetic HDAC mouse models that endogenous HDAC5 but not HDAC9 contributes specifically to the repression of endogenous MEF2 activity. HDAC4 contributed significantly to the repression of MEF2 activity but based on the mechanistic findings of this study combined with previous results we attribute this to PKA-dependent proteolysis of HDAC4. Consistently, cAMP-induced repression of agonist-driven cellular hypertrophy was blunted in cardiomyocytes deficient for both HDAC5 and HDAC4. In conclusion, cAMP inhibits MEF2 through both nuclear accumulation of hypo-phosphorylated HDAC5 and through a distinct HDAC4-dependent mechanism.