Over 580 000 people in the US experience homelessness, with one of the largest concentrations residing in San Francisco, California. Unhoused individuals have a life expectancy of approximately 50 years, yet how sudden death contributes to this early mortality is unknown. To compare incidence and causes of sudden death by autopsy among housed and unhoused individuals in San Francisco County. This cohort study used data from the Postmortem Systematic Investigation of Sudden Cardiac Death (POST SCD) study, a prospective cohort of consecutive out-of-hospital cardiac arrest deaths countywide among individuals aged 18 to 90 years. Cases meeting World Health Organization criteria for presumed SCD underwent autopsy, toxicologic analysis, and medical record review. For rate calculations, all 525 incident SCDs in the initial cohort were used (February 1, 2011, to March 1, 2014). For analysis of causes, 343 SCDs (incident cases approximately every third day) were added from the extended cohort (March 1, 2014, to December 16, 2018). Data analysis was performed from July 1, 2022, to July 1, 2023. The main outcomes were incidence and causes of presumed SCD by housing status. Causes of sudden death were adjudicated as arrhythmic (potentially rescuable with implantable cardioverter-defibrillator), cardiac nonarrhythmic (eg, tamponade), or noncardiac (eg, overdose). A total of 868 presumed SCDs over 8 years were identified: 151 unhoused individuals (17.4%) and 717 housed individuals (82.6%). Unhoused individuals compared with housed individuals were younger (mean [SD] age, 56.7 [0.8] vs 61.0 [0.5] years, respectively) and more often male (132 [87.4%] vs 499 [69.6%]), with statistically significant racial differences. Paramedic response times were similar (mean [SD] time to arrival, unhoused individuals: 5.6 [0.4] minutes; housed individuals: 5.6 [0.2] minutes; P = .99), while proportion of witnessed sudden deaths was lower among unhoused individuals compared with housed individuals (27 [18.0%] vs 184 [25.7%], respectively, P = .04). Unhoused individuals had higher rates of sudden death (incidence rate ratio [IRR], 16.2; 95% CI, 5.1-51.2; P < .001) and arrhythmic death (IRR, 7.2; 95% CI, 1.3-40.1; P = .02). These associations remained statistically significant after adjustment for differences in age and sex. Noncardiac causes (96 [63.6%] vs 270 [37.7%], P < .001), including occult overdose (48 [31.8%] vs 90 [12.6%], P < .001), gastrointestinal causes (8 [5.3%] vs 15 [2.1%], P = .03), and infection (11 [7.3%] vs 20 [2.8%], P = .01), were more common among sudden deaths in unhoused individuals. A lower proportion of sudden deaths in unhoused individuals were due to arrhythmic causes (48 of 151 [31.8%] vs 420 of 717 [58.6%], P < .001), including acute and chronic coronary disease. In this cohort study among individuals who experienced sudden death in San Francisco County, homelessness was associated with greater risk of sudden death from both noncardiac causes and arrhythmic causes potentially preventable with a defibrillator.