Dilated cardiomyopathy (DCM) is characterized by reduced cardiac output, as well as thinning and enlargement of left ventricular chambers. These characteristics eventually lead to heart failure. Current standards of care do not target the underlying molecular mechanisms associated with genetic forms of heart failure, driving a need to develop novel therapeutics for DCM. To identify candidate therapeutics, we developed an in vitro DCM model using induced pluripotent stem cell-derived cardiomyocytes (iPSC-CMs) deficient in B-cell lymphoma 2 (BCL2)-associated athanogene 3 (BAG3). With these BAG3-deficient iPSC-CMs, we identified cardioprotective drugs using a phenotypic screen and deep learning. From a library of 5500 bioactive compounds and siRNA validation, we found that inhibiting histone deacetylase 6 (HDAC6) was cardioprotective at the sarcomere level. We translated this finding to a BAG3 cardiomyocyte-knockout (BAG3cKO) mouse model of DCM, showing that inhibiting HDAC6 with two isoform-selective inhibitors (tubastatin A and a novel inhibitor TYA-018) protected heart function. In BAG3cKO and BAG3E455K mice, HDAC6 inhibitors improved left ventricular ejection fraction and reduced left ventricular diameter at diastole and systole. In BAG3cKO mice, TYA-018 protected against sarcomere damage and reduced Nppb expression. Based on integrated transcriptomics and proteomics and mitochondrial function analysis, TYA-018 also enhanced energetics in these mice by increasing expression of targets associated with fatty acid metabolism, protein metabolism, and oxidative phosphorylation. Our results demonstrate the power of combining iPSC-CMs with phenotypic screening and deep learning to accelerate drug discovery, and they support developing novel therapies that address underlying mechanisms associated with heart disease.