We examine within a life-cycle model the simultaneous choice of health care and retirement (together with consumption). Health tends to have an impact on retirement through morbidity, determining earnings and the disutility of work, and through longevity, determining the need to accumulate retirement wealth. Conversely, the age of retirement drives the demand for health care through the value of survival and the value of morbidity reductions. We characterise the optimal relationship between health expenditure and retirement and apply our model to analyse the effects of moral hazard in the annuity market. While moral hazard always induces excessive health investments and an excessive duration of working life, it also triggers an excessive level of consumption if the impact of health on the disutility of work is sufficiently large. We examine a transfer scheme and mandatory retirement as policies towards curtailing moral hazard. Numerical analysis illustrates the role of moral hazard in shaping the life-cycle allocation.