Approximately 30% of myocarditis patients progress to develop dilated cardiomyopathy, which is a major cause of sudden death in children and young adults. Ly6Chi inflammatory monocytes are thought to play a detrimental role in a mouse model of experimental autoimmune myocarditis (EAM). Their recruitment in large numbers to the heart has been linked to cardiac fibrosis and ventricular dysfunction. However, the mechanism underlying the pathogenic role of Ly6Chi monocytes has been overlooked, and the protective role of Ly6Clo monocytes was largely presumed based on extrapolation from other disease models. We therefore studied the fates and functions of these two types of monocytes to better understand their roles in the injured myocardium. We demonstrated in vitro that cardiac fibroblasts mediate monocyte-to-macrophage differentiation through direct contact with Ly6Chi and Ly6Clo monocytes. IL-17A is significantly elevated during acute myocarditis. It signals through cardiac fibroblasts to abolish Ly6Clo monocyte-to-macrophage differentiation as well as to hamper phagocytic function in Ly6Chi monocyte-derived macrophages. Phagocytosis of apoptotic/necrotic myocardial cells by macrophages plays a crucial role in minimizing myocardial damage and subsequent dysfunction. Strikingly, cardiac IL-17A in heart failure patients is inversely correlated with phagocytic receptor expression in the myeloid compartment. This highlights the clinical relevance of our finding and can lead to the development of diagnostic biomarkers or novel treatment approaches. IL-17A signaling wanes during inflammation resolution, allowing Ly6Clo monocyte-to-macrophage differentiation to resume. These macrophages display antigen presentation properties which coincide with cardiac protection in IL-17Ra–/– mice in vivo. In conclusion, we described how the inflammatory environment modulates the phenotype and functions of infiltrating monocytes with potential implications for other autoimmune and inflammatory diseases