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 212 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 (>30 ng/ml), insufficient (21-29 ng/ml), or deficient (<20 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 11 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 33. 62 ng/dL. The average number of hospitalization days was 4.8 days, and the rate of re-hospitalization was 26.6% in the six-month follow-up and 30.3% in the 9-month follow-up. The hospital mortality rate was equal to 1.4%, and the mortality rate at the end of the follow-up period was equal to 8.3%. 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 33. 62 ng/ml,with 52.8% of patients having insufficient or deficient levels. The most common in-hospital complication was ventricular tachycardia (11.5%). 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: 6.984, 95% CI: 3.500-13.936, p<0.001). The 6-month readmission rate was 26.6%, increasing to 30.3% at 9 months. Vitamin D deficiency was also associated with increased cardiac mortality (HR: 12.936, 95% CI: 1.494- 112.016, p=0.020) during follow-up. The 9-month mortality rate was 8.3%. 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