Background and Objectives: This study estimates the prevalence and severity of erectile dysfunction and its association with cardiovascular risk factors in patients after a myocardial infarction. Materials and Methods: This study included men aged 35–80 years, diagnosed with myocardial infarction and examined in the Department of Preventive Cardiology of Vilnius University Hospital Santaros Klinikos between 2016 and 2020. Anthropometric characteristics, blood pressure, lipid profile, blood glucose levels and prevalence of cardiovascular risk factors were evaluated. The International Index of Erectile Function-5 was used to assess patients’ erectile function. Results: A total of 171 patients were analysed. The mean age was 57.6 ± 8.8 years. Of the patients, 42.1, 25.1 and 11.7% had three, four and five established cardiovascular risk factors, respectively. Of the patients, 100% were diagnosed with dyslipidaemia, 90.0%—arterial hypertension, 14.6%—diabetes, 23.3%—smoking, 43.7%—positive familial history and 54.5%—insufficient physical activity. The overall prevalence of erectile dysfunction was 62%. It was scored mild in 37.4%, mild-to-moderate—15.2%, moderate—5.3% and severe in 4.1% of the patients. The mean age was significantly different between severity groups (p < 0.001). The study demonstrated a negative correlation between age and total score of the questionnaire (r = −0.308, p < 0.001). Arterial hypertension was more frequent in the patients with erectile dysfunction (p = 0.02). Other cardiovascular risk factors were distributed similarly. Conclusions: Erectile dysfunction is common in patients after a myocardial infarction and its severity is age dependent. The prevalence of cardiovascular risk factors is high, with arterial hypertension significantly more frequent in patients with erectile dysfunction.