BackgroundPopulation ageing is considered one of the biggest challenges facing the world, and the status of the elderly in society and their quality of life (QOL) have proved to be a concern in professional and scientific research circles. As a result, the current study sought to investigate the role of pain self-efficacy (PSE) as a moderator in the relationship between sense of coherence (SOC), spiritual well-being, and self-compassion with QOL in Iranian elderly with cardiovascular disease (CVD).MethodThis was a correlational study of the path analysis type. The statistical population included all elderly people with CVD who were at least 60 years of age in Kermanshah Province, Iran, in 2022, of whom 298 (181 men and 117 women) were selected using convenience sampling and according to the inclusion and exclusion criteria. The participants answered questionnaires from the World Health Organization on QOL, Paloutzian and Ellison’s spiritual well-being, Nicholas’s PSE, Antonovsky’s SOC, and Raes et al.’s self-compassion.ResultsThe results of path analysis demonstrated that the hypothesized model of this study has a good fit in the studied sample. There were significant paths between SOC (β = 0.39), spiritual well-being (β = 0.13) and self-compassion (β = 0.44) with PSE. Although there were significant paths between SOC (β = 0.16) and self-compassion (β = 0.31) with QOL, there was no significant path between spiritual well-being and QOL (β = 0.06). Besides, there was a significant path between PSE and QOL (β = 0.35). Finally, PSE was found to mediate the relationship of SOC, spiritual well-being and self-compassion with QOL.ConclusionThe results may provide psychotherapists and counselors working in this field of inquiry with advantageous information to choose or create a useful therapeutic method to work with the elderly with CVD. Meanwhile, other researchers are suggested to examine other variables which may serve a mediating role in the mentioned model.