Osteoporotic medication after hip fracture is widely recommended by clinical practice guidelines, and medication adherence is essential to meet clinical trial risk reduction figures in the real world. We assessed primary and secondary non-adherence to osteoporosis medications in patients discharged following a hip fracture and identified factors associated with secondary non-adherence. From a population-based retrospective cohort of 19,405 patients aged 65 years and over discharged from a hip fracture in the region of Valencia (Spain) from January 1, 2008 and June 30, 2012, we followed, over a minimum of 365 days, 4,856 patients with at least one osteoporotic medication prescribed within the first six months after discharge. Less than one third of the patients discharged alive after a hip fracture received osteoporotic treatment. Primary non-adherence among naive patients was low. However, long-term secondary adherence measured by Proportion of Days Covered with medication (PDC) and persistence was largely suboptimal, with naive users having worse results than experienced patients. Secondary non-adherence was associated with primary non-adherence and age, dementia or sedative treatments for naIve users and with being male, being older than 85 and having dementia for experienced users. Three quarters of naIve users and two thirds of experienced users had interrupted treatment at 48 months.