Immune checkpoint inhibitors (ICIs) exhibit remarkable antitumor activity and immune-related cardiotoxicity of unknown pathomechanism. The aim of the study was to investigate the ICI class-dependent cardiotoxicity in vitro and pembrolizumab’s (Pem’s) cardiotoxicity in vivo, seeking for translational prevention means. Cytotoxicity was investigated in primary cardiomyocytes and splenocytes, incubated with ipilimumab, Pem and avelumab. Pem’s cross-reactivity was assessed by circular dichroism (CD) on biotechnologically produced human and murine PD-1 and in silico. C57BL6/J male mice received IgG4 or Pem for 2 and 5 weeks. Echocardiography, histology, and molecular analyses were performed. Coronary blood flow velocity mapping and cardiac magnetic resonance imaging were conducted at 2 weeks. Human EA.hy926 endothelial cells were incubated with Pem-conditioned media from human mononuclear cells, in presence and absence of statins and viability and molecular signaling were assessed. Atorvastatin (20 mg/kg, daily) was administered in vivo, as prophylaxis. Only Pem exerted immune-related cytotoxicity in vitro. Pem’s cross-reactivity with the murine PD-1 was confirmed by CD and docking. In vivo, Pem initiated coronary endothelial and diastolic dysfunction at 2 weeks and systolic dysfunction at 5 weeks. At 2 weeks, Pem induced ICAM-1 and iNOS expression and intracardiac leukocyte infiltration. At 5 weeks, Pem exacerbated endothelial activation and triggered cardiac inflammation. Pem led to immune-related cytotoxicity in EA.hy926 cells, which was prevented by atorvastatin. Atorvastatin mitigated functional deficits, by inhibiting endothelial dysfunction in vivo. We established for the first time an in vivo model of Pem-induced cardiotoxicity. Coronary endothelial dysfunction precedes Pem-induced cardiotoxicity, whereas atorvastatin emerges as a novel prophylactic therapy.