We examined factors associated with increased mortality in a cohort of 85,203 adults with a history of imprisonment in New South Wales, Australia, between 1988 and 2002. Information on death was collected through linkage to the Australian National Death Index. The influence of demographic and criminological factors on the standardised mortality ratio (SMR) for all-cause mortality, and deaths due to drug overdose and suicide was examined using negative binomial regression models. The number of deaths identified was 5,137 (4,714 men, 423 women, 303 in custody). The overall SMR was 3.7 (3.6-3.8) in men and 7.8 (7.1-8.5) in women. SMRs raised for deaths due to drug overdose (men: 12.8, women: 50.3) and suicide (men: 4.8, women: 12.2). The high SMR was associated with hospitalisation for mental illness, multiple imprisonments, and early stage of follow-up independently of causes of death. Being released from prison increased the SMRs for all-cause and drug-related mortality, but not suicide. For women, significant trends for decreasing risk with increasing age were noted. Minority groups, in particular men, had a lower risk of death than white people. In men a sex or drug offence was associated with a lower risk and a property or violence offence was related to higher mortality. Our results reinforce how disadvantaged prisoners are, measured by mortality as the most fundamental scale of human wellbeing. Certain demographic and imprisonment characteristics are indicators of high mortality among this population. The underlying causes of some of these characteristics such as mental illness or multiple imprisonments are potentially treatable and preventable. Prison health services need to develop interventions targeting high-risk groups to avoid this situation.