Objectives: Vitamin D deficiency has been linked to cardiovascular diseases, but its impact on outcomes in myocardial infarction (MI) patients remains unclear. This study investigated the relationship between serum vitamin D levels and short-term and medium-term outcomes in patients with myocardial infarction. Ischemic heart diseases (IHD) are the most common cause of death in the world. Identifying risk factors and predictors can play a critical role in identifying high-risk people in screenings, identifying high-risk patients during admission to the hospital, and adjusting these risk factors in patients to improve prognosis. Methods: This prospective observational study was conducted on ۲۱۲ patients diagnosed with myocardial infarction at Seyed al-Shohada Hospital in Urmia, Iran. Having been admitted, the patients had their serum vitamin D levels measured using the same blood sample for routine tests. Levels of vitamin D were categorized as normal (>۳۰ ng/ml), insufficient (۲۱-۲۹ ng/ml), or deficient (<۲۰ ng/ml). The patient's files provided the demographic, clinical, and biomedical information, echocardiography, and angiography data. The patients were followed for at least six months post-MI, with a maximum follow-up of ۱۱ months. Follow-up occurred through monthly phone calls and outpatient clinic visits as needed. Primary outcomes included in-hospital complications (such as death, significant bleeding, acute pulmonary edema, cardiogenic shock, and arrhythmias), cardiac readmissions, and mortality. Logistic regression and Cox regression analyses were used to examine the connection between outcome variables and vitamin D levels, adjusting for potential confounders including age, gender, blood pressure, diabetes, blood lipids, creatinine, disease severity (SYNTAX score*), and left ventricular ejection fraction. The mean serum level of vitamin D in patients on admission was ۳۳. ۶۲ ng/dL. The average number of hospitalization days was ۴.۸ days, and the rate of re-hospitalization was ۲۶.۶% in the six-month follow-up and ۳۰.۳% in the ۹-month follow-up. The hospital mortality rate was equal to ۱.۴%, and the mortality rate at the end of the follow-up period was equal to ۸.۳%. The most common complication during hospitalization among the patients was ventricular tachycardia. However, in follow-up, re-hospitalization due to previous issues was the most common complication. Results: The mean serum vitamin D level was ۳۳. ۶۲ ng/ml,with ۵۲.۸% of patients having insufficient or deficient levels. The most common in-hospital complication was ventricular tachycardia (۱۱.۵%). Vitamin D deficiency was not significantly associated with in-hospital complications. However, during the follow-up period, vitamin D deficiency was significantly related to increased risk of readmission to hospital (HR: ۶.۹۸۴, ۹۵% CI: ۳.۵۰۰-۱۳.۹۳۶, p<۰.۰۰۱). The ۶-month readmission rate was ۲۶.۶%, increasing to ۳۰.۳% at ۹ months. Vitamin D deficiency was also associated with increased cardiac mortality (HR: ۱۲.۹۳۶, ۹۵% CI: ۱.۴۹۴-۱۱۲.۰۱۶, p=۰.۰۲۰) during follow-up. The ۹-month mortality rate was ۸.۳%. Other factors contributing to cardiac mortality included disease severity (SYNTAX score) and female gender. Conclusions: While vitamin D deficiency did not impact short-term complications, it was associated with increased risk of hospitalreadmission and mortality in MI patients during medium-term follow-up. These findings suggest that vitamin D status can significantly impact long-term outcomes for MI patients.