Cardiac fibrosis represents the terminal pathological progression of diverse cardiovascular diseases, characterized by aberrant activation and migration of cardiac fibroblasts, as well as excessive and disordered deposition of the extracellular matrix. Our previous study showed that NAP1L1 is an important regulator of cardiac fibrosis and is upregulated in ischemic cardiomyopathy patient hearts. Accordingly, discovery of NAP1L1 inhibitors and elucidating their underlying mechanisms of anti-cardiac fibrosis should be urgently needed. Herein, we identified a new NAP1L1 small molecule inhibitor Z1149421873 (named Z11) by the structure-based drug design strategy. Z11 was shown to inhibit cardiac fibroblasts activation, deposition of collagen hypersecretion, and alleviate cardiac fibrosis in both in vitro models induced by TGF-β1 and in vivo myocardial infarction (MI) mouse models. Mechanistically, Z11 interfered with the interaction between NAP1L1 and YAP1, which in turn promotes the ubiquitination degradation of YAP1, thereby inhibiting the AKT/mTOR signaling pathway, and attenuating myofibroblast activity and cardiac fibrosis, and improving cardiac function after MI. This finding may provide new insights for the development of promising candidate drugs for the treatment of cardiac fibrosis related diseases in the future.