Objective. To evaluate the association between diabetes mellitus and health-related quality of life (HRQOL) controlled for several sociodemographic and anthropometric variables, in a representative sample of the Spanish population. Methods. A population-based, cross-sectional, and cluster sampling study, with the entire Spanish population as the target population. Five thousand and forty-seven participants (2162/2885 men/women) answered the HRQOL short form 12-questionnaire (SF-12). The physical (PCS-12) and the mental component summary (MCS-12) scores were assessed. Subjects were divided into four groups according to carbohydrate metabolism status: normal, prediabetes, unknown diabetes (UNKDM), and known diabetes (KDM). Logistic regression analyses were conducted. Results. Mean PCS-12/MCS-12 values were 50.9 ± 8.5/ 47.6 ± 10.2, respectively. Men had higher scores than women in both PCS-12 (51.8 ± 7.2 versus 50.3 ± 9.2; P < 0.001) and MCS-12 (50.2 ± 8.5 versus 45.5 ± 10.8; P < 0.001). Increasing age and obesity were associated with a poorer PCS-12 score. In women lower PCS-12 and MCS-12 scores were associated with a higher level of glucose metabolism abnormality (prediabetes and diabetes), (P < 0.0001 for trend), but only the PCS-12 score was associated with altered glucose levels in men (P < 0.001 for trend). The Odds Ratio adjusted for age, body mass index (BMI) and educational level, for a PCS-12 score below the median was 1.62 (CI 95%: 1.2–2.19; P < 0.002) for men with KDM and 1.75 for women with KDM (CI 95%: 1.26–2.43; P < 0.001), respectively. Conclusion. Current study indicates that increasing levels of altered carbohydrate metabolism are accompanied by a trend towards decreasing quality of life, mainly in women, in a representative sample of Spanish population.