The RANK (receptor activator of nuclear factor κB)/RANKL (RANK ligand)/OPG (osteoprotegerin) axis is activated after myocardial infarction (MI), but its pathophysiological role is not well understood. Here, we investigated how global and cell compartment-selective inhibition of RANKL affects cardiac function and remodeling after MI in mice. Global RANKL inhibition was achieved by treatment of human RANKL knock-in (huRANKL-KI) mice with the monoclonal antibody AMG161. huRANKL-KI mice express a chimeric RANKL protein wherein part of the RANKL molecule is humanized. AMG161 inhibits human and chimeric but not murine RANKL. To dissect the pathophysiological role of RANKL derived from hematopoietic and mesenchymal cells, we selectively exchanged the hematopoietic cell compartment by lethal irradiation and across-genotype bone marrow transplantation between wild-type and huRANKL-KI mice, exploiting the specificity of AMG161. After permanent coronary artery ligation, mice were injected with AMG161 or an isotype control antibody over 4 weeks post-MI. MI increased RANKL expression mainly in cardiomyocytes and scar-infiltrating cells 4 weeks after MI. Only inhibition of RANKL derived from hematopoietic cellular sources, but not global or mesenchymal RANKL inhibition, improved post-infarct survival and cardiac function. Mechanistically, hematopoietic RANKL inhibition reduced expression of the pro-inflammatory cytokine IL-1ß in the cardiac cellular infiltrate. In conclusion, inhibition of RANKL derived from hematopoietic cellular sources is beneficial to maintain post-ischemic cardiac function by reduction of pro-inflammatory cytokine production. KEY MESSAGES: Experimental myocardial infarction (MI) augments cardiac RANKL expression in mice. RANKL expression is increased in cardiomyocytes and scar-infiltrating cells after MI. Global or mesenchymal cell RANKL inhibition has no influence on cardiac function after MI. Inhibition of RANKL derived from hematopoietic cells improves heart function post-MI. Hematopoietic RANKL inhibition reduces pro-inflammatory cytokines in scar-infiltrating cells.