Cardiogenic shock (CS) and cardiac arrest (CA) are serious complications in ST-elevation myocardial infarction (STEMI) patients, with lack of long-term data according to their timing of occurrence. This study sought to determine the incidence and relationship between the timing of occurrence and prognostic impact of CS and CA complicating STEMI in the long-term follow-up. We conducted a retrospective analysis of consecutive STEMI patients treated between 2004 and 2017. Patients were divided into four groups based on the occurrence of neither CA nor CS, CA only, CS only, and both CA and CS (CA-CS-, CA+, CS+, and CA+CS+, respectively). Adjusted Cox regression analysis was used to assess the independent association between the CS and CA categories and mortality. A total of 1603 STEMI patients were followed for a median of 3.6 years. CA and CS occurred in the 12.2% and 15.9% of patients, and both impacted long-term mortality [adjusted hazard ratio (HR) = 2.59, 95% confidence interval (CI): 1.53-4.41, P < 0.001; HR = 3.16, 95% CI: 2.21-4.53, P < 0.001, respectively). CA+CS+ occurred in 7.3%, with the strongest association with higher mortality (adjusted HR = 5.36; 95% CI: 3.80-7.55, P < 0.001). Using flexible parametric models with B-splines, the increased mortality was restricted to the first ∼10 months. In addition, overall mortality rates were higher at all timings (all with P < 0.001), except for CA during initial cardiac catheterization (P < 0.183). CS and CA complicating patients presenting with STEMI were associated with higher long-term mortality rate, especially in the first 10 months. Both CS+ and CA+ at any timeframe impacted outcomes, except for CA+ during the initial cardiac catheterization, although this will have to be confirmed in larger future studies, given the relatively small number of patients.