We report the risks of a comprehensive range of disease and drug categories on hip fracture occurrence using a strict population-based cohort design. Participants included the source population of a Swedish county, aged ≥50 years (n = 117,494) including all incident hip fractures during 1 year (n = 477). The outcome was hospitalization for hip fracture (ICD-10 codes S72.0–S72.2) during 1 year (2009–2010). Exposures included: prevalence of (1) inpatient diseases [International Classification of Diseases (ICD) codes A00–T98 in the National Patient Register 1987–2010] and (2) prescribed drugs dispensed in 2010 or the year prior to fracture. We present age- and sex-standardized risk ratios (RRs), risk differences (RDs) and population attributable risks (PARs) of disease and drug categories in relation to hip fracture risk. All disease categories were associated with increased risk of hip fracture. Largest risk ratios and differences were for mental and behavioral disorders, diseases of the blood and previous fracture (RRs between 2.44 and 3.00; RDs (per 1000 person-years) between 5.0 and 6.9). For specific drugs, strongest associations were seen for antiparkinson (RR 2.32 [95 % CI 1.48–1.65]; RD 5.2 [1.1–9.4]) and antidepressive drugs (RR 1.90 [1.55–2.32]; RD 3.1 [2.0–4.3]). Being prescribed ≥10 drugs during 1 year incurred an increased risk of hip fracture, whereas prescription of cardiovascular drugs or ≤5 drugs did not appear to increase risk. Diseases inferring the greatest PARs included: cardiovascular diseases PAR 22 % (95 % CI 14–29) and previous injuries (PAR 21 % [95 % CI 16–25]; for specific drugs, antidepressants posed the greatest risk (PAR 16 % [95 % CI 12.0–19.3]).Electronic supplementary materialThe online version of this article (doi:10.1007/s00223-016-0194-7) contains supplementary material, which is available to authorized users.