To determine the risk and time trends of heart failure (HF) leading to hospitalization in individuals newly diagnosed as having polymyositis/dermatomyositis (PM/DM) relative to non-PM/DM controls at the general population level. A retrospective cohort study was conducted using data from a nationwide insurance database in Taiwan. Patients with incident PM/DM and without a history of HF were selected between 2000 and 2013. Unmatched and propensity score-matched cohorts were established separately. A multivariable Cox proportional hazards regression model was used to estimate the adjusted hazard ratio (HR) for the risk of HF in the unmatched cohort. In the propensity score-matched cohort, general population controls were selected and matched at a 1:1 ratio to the patients with PM/DM based on propensity scores, which accounted for the confounding factors of age, sex, index date (year) of first diagnosis, comorbidities, and medication usage. The cumulative incidence of HF was estimated using the Kaplan-Meier method. A stratified Cox proportional hazards model was used to calculate the HR for the risk of HF events at different follow-up time points among patients with PM/DM compared with non-PM/DM controls in the propensity score-matched cohort. In the unmatched cohort, the study assessed 2,025 patients with PM/DM and 196,109 general population controls. Results of multivariable Cox regression analysis, adjusted for age, sex, comorbidities, and medication usage, revealed a greater risk of HF leading to hospitalization in the PM/DM group than in the control group (adjusted HR 3.29, 95% confidence interval [95% CI] 2.60-4.18). After matching based on propensity score, a total of 1,997 pairs of PM/DM patients and general population controls were identified. In this propensity score-matched cohort, the cumulative incidence of HF in patients with PM/DM at 3 years, 5 years, and 10 years was 3.3%, 4.4%, and 7.4%, respectively. The absolute difference in HF risk in the PM/DM group compared with the control group was 1.8% at 3 years, 2.1% at 5 years, and 3.0% at 10 years. Compared with general population controls, patients with PM/DM exhibited an augmented risk of HF (HR 2.06, 95% CI 1.36-3.12). Analyses stratified according to follow-up time point revealed that the increased risk of HF persisted for up to 10 years after the PM/DM diagnosis. These results indicate that the risk of HF leading to hospitalization was increased in patients with PM/DM throughout the study period, supporting the need for greater vigilance in the monitoring of patients with PM/DM for the development of this potentially lethal complication.