Aim: To evaluate prevalence of heart failure (HF) medical treatment and its impact on ventricular arrhythmia (VA) and survival among patients implanted with primary prevention ICD/CRTD. Methods and results: The association of treatment and dose (% guideline recommended target) of beta-blockers (BB), Angiotensin-antagonists (AngA), Mineralocorticoid-antagonsits (MRA), and Anti-Arrhythmic Drugs (AAD) after ICD/CRTD implant with VA episodes and mortality was analyzed. We included 186 patients, meanSD age 66.412 years, 15.1% female, 79(42.5%) implanted with an ICD and 107(57.5%) with CRTD. During 3.8 [2.1;6.7] (median[IQR]) years; 52(28%) had VA and 77(41.4%) died. Treatment (medication, % of patients) included: BB (83%), AngA (87%), MRA (59%), and AAD (43.5%). Median doses were 25[12.5;50]% of target for BB or AngA and 25[0;50]% of target for MRA. Treatment with >25% target dose of BB was associated with reduced incident VA. In a multivariable model including age, gender, diabetes, heart rate, and medication doses, increased BB dose was significantly and independently associated with reduced VA (HR 0.443 95%CI 0.222-0.885; p=0.021). On multivariable model for overall mortality including age, gender, renal disease, VA, and medical treatment; VA was associated with increased mortality (HR 2.672; 95% CI 1.429-4.999; p=0.002) and AngA treatment was significantly and independently associated with reduced mortality (HR 0.515; 95% CI 0.285-0.929; p=0.028). Conclusions: In this cohort of real-life HF patients discharged after ICD/CRTD implant, most of the patients were prescribed with guideline-based HF medications albeit with low doses. Higher BB dose was associated with reduced VA, while treatment with AngA was associated with improved survival.