To investigate the relationship between onset of delirium and time to surgery in hip fracture (HF) patients with a different degree of cognitive impairment. Retrospective analysis of a prospective database of 939 older adults, aged ≥ 75years admitted with a fragility HF. Subjects underwent a Comprehensive Geriatric Assessment on admission, evaluating health status, prefracture functional status in basic and instrumental activities of daily living, and walking ability. According to the Short Portable Mental Status Questionnaire score, patients were stratified into three categories: cognitively healthy (0-2 errors), mildly to moderately impaired (3-7 errors) and severely impaired (8-10 errors). Time to surgery (from admission) was expressed as days. The occurrence of delirium was ascertained daily by Confusion Assessment Method. Two hundred ninety-two (31.1%) patients experienced delirium during in-hospital stay. They were older, with a higher degree of comorbidity and functional impairment compared to patients without delirium. In multivariate analysis, surgical delay resulted a significant independent risk factor for delirium (HR 1.11, 95% CI 1.01-1.24), along with age, prefracture functional disability and cognitive impairment. When the analysis was performed accounting for the cognitive categories, surgical delay demonstrated to increase the risk of delirium only in the subcategory of mildly to moderately impaired patients, while no significant effect was demonstrated in patients cognitively healthy or severely impaired. The study supports the concept that older adults with HF should undergo surgery quickly. Patients with mild-to-moderate cognitive impairment should be primarily considered as the best target for interventions aiming to reduce time to surgery.