Background Serious mental illness (SMI) is a set of disabling conditions associated with poor outcomes and high healthcare utilisation. However, little is known about patterns of utilisation and costs across sectors for people with SMI. Objective The aim was to develop a costing methodology and estimate annual healthcare costs for people with SMI in England across primary and secondary care settings. Methods A retrospective observational cohort study was conducted using linked administrative records from primary care, emergency departments, inpatient admissions, and community mental health services, covering financial years 2011/12-2013/14. Costs were calculated using bottom-up costing and are expressed in 2013/14 British pounds (GBP). Determinants of annual costs by sector were estimated using generalised linear models. Results Mean annual total healthcare costs for 13,846 adults with SMI were £4989 (median £1208), comprising 19% from primary care (£938, median £531), 34% from general hospital care (£1717, median £0), and 47% from inpatient and community-based specialist mental health services (£2334, median £0). Mean annual costs related specifically to mental health, as distinct from physical health, were £2576 (median £290). Key predictors of total cost included physical comorbidities, ethnicity, neighbourhood deprivation, SMI diagnostic subgroup, and age. Some associations varied across care context; for example, older age was associated with higher primary care and hospital costs, but lower mental healthcare costs. Conclusions Annual healthcare costs for people with SMI vary significantly across clinical and socioeconomic characteristics and healthcare sectors. This analysis informs policy and research, including estimation of health budgets for particular patient profiles, and economic evaluation of health services and policies.