The main aim of this study was to determine the association of various clinical, functional and pharmacological factors with the physical (PCS) and mental (MCS) summary components of the health-related quality of life (HRQoL) of community-dwelling older adults. Design: Cross-sectional study. Patients and setting: Sample of 573 persons aged over 65 years, recruited at 12 primary healthcare centres in Málaga, Spain. Sociodemographic, clinical, functional, and comprehensive drug therapy data were collected. The main outcome was HRQoL assessed on the basis of the SF-12 questionnaire. A multinomial logistic regression model was constructed to study the relationship between independent variables and the HRQoL variable, divided into intervals. The average self-perceived HRQoL score was 43.2 (± 11.02) for the PCS and 48.5 (± 11.04) for the MCS. The factors associated with a poorer PCS were dependence for the instrumental activities of daily living (IADL), higher body mass index (BMI), number of medications, and presence of osteoarticular pathology. Female gender and the presence of a psychopathological disorder were associated with worse scores for the MCS. The condition that was most strongly associated with a poorer HRQoL (in both components, PCS and MCS) was that of frailty (odds ratio (OR) = 37.42, 95% confidence interval (CI) = 8.96–156.22, and OR = 20.95, 95% CI = 7.55–58.17, respectively). It is important to identify the determinant factors of a diminished HRQoL, especially if they are preventable or modifiable.