The current study aims to identify the factors associated with anxiety and depression in patients with acute coronary syndrome (ACS) at hospital discharge from a Peruvian health center. Patients at discharge from the cardiology hospitalization service between November 2019 and December 2020 were evaluated using a cross-sectional study. The median time elapsed from the ACS event to the interview date was 10 months. A total of 34.1% of the population presented mild depression and 78.8% had mild anxiety. All three of our analyses indicated that patients who had attended university had significantly lower levels of both depression and anxiety, and patients with diabetes had significantly higher levels of anxiety. The lower-low socioeconomic group had 1.5 times the frequency of depression (p-value = 0.002) and 3.12 times the frequency of anxiety (p-value = 0.050). Interestingly, while a good quality of life was associated with lower levels of depression, it was also associated with higher levels of moderate/severe anxiety (p-value = 0.035). A multiple regression analysis found that hypertension was also associated with higher levels of anxiety, and patients who have had COVID-19 had 21.05 times the level of moderate/severe anxiety (p-value = 0.000). Cases of ACS are more frequent in patients with an age greater than or equal to 60 years, as well as in males. Isolation was a common feature that may have a negative impact on their quality of life and mental health.