We previously found a positive association between calcium plus vitamin D and antiosteoporotic drugs and survival among hip fracture patients. Our aim was to verify this observation using a nationwide database. A retrospective cohort of home-discharged hip fracture patients aged 50 years or older (n = 23,615) was enrolled from the national database. Primary exposure was medical treatment for osteoporosis, and the outcome was all-cause mortality. Cumulative mortalities were calculated using the Kaplan-Meier estimator. The relationship between mortality and medication purchases was modeled using Cox's proportional hazards regression with time-dependent covariates for medication use. One in 4 women and 1 in 10 men with a hip fracture were treated for osteoporosis in Finland. Unadjusted 1-year mortality was lower among patients who purchased calcium plus vitamin D or vitamin D supplements and antiosteoporotic drugs than among those who did not purchase these medications [hazard ratio (HR) = 0.74, 95% confidence interval (CI) 0.67-0.81]. The difference in unadjusted cumulative mortality remained in favor of the drug users for at least 5 years. Among men, the use of calcium plus vitamin D or vitamin D supplements was associated with lower 1-year mortality even after adjustments for observed confounders (HR = 0.74, 95% CI 0.56-0.97). Among women, the use of antiosteoporotic drugs was associated with lower mortality (HR = 0.79, 95% CI 0.67-0.93). There was a tendency to even better survival in both genders if calcium plus vitamin D or vitamin D supplements and antiosteoporotic drugs were used simultaneously, the HR being 0.72 (95% CI 0.50-1.03) in men and 0.62 (95% CI 0.50-0.76) in women.