Background Recent studies have indicated that unmanaged pain, both acute and chronic, can affect mental status and might precipitate delirium, especially in elderly patients with hip fractures. The aim of this study was to assess the effectiveness of fascia iliaca compartment block (FICB) for prevention of perioperative delirium in hip surgery patients who were at intermediate or high risk for this complication. Materials and methods On admission, all included patients were divided into three groups according to low, intermediate or high risk for perioperative delirium. Eligible patients (those classified as at intermediate or high risk for developing delirium) were sequentially randomly assigned to study treatment (FICB prophylaxis or placebo) according to a computer-generated randomization code. The primary outcome was perioperative delirium. Diagnosis of the syndrome was defined using the Diagnostic and Statistical Manual of Mental Disorders, 4th edition (DSM-IV) and Confusion Assessment Method (CAM) criteria. Secondary outcome variables were severity of delirium and delirium duration. Results Delirium occurred in 33 (15.94%) out of 207 patients randomized to FICB prophylaxis or the placebo group. Incidence of delirium in the FICB prophylaxis group was 10.78% (11/102), significantly different from the incidence (23.8%, 25/105) in the placebo group [relative risk 0.45, 95% confidence interval (CI) 0.23–0.87]. Nine of 17 patients with high risk for delirium and included in the FICB prophylaxis group developed delirium, whereas 10 of 16 high-risk patients included in the placebo group became delirious (relative risk 0.84, CI 0.47–1.52). Two of 85 patients with intermediate risk for delirium and included in the FICB prophylaxis group developed delirium, whereas 15 of 89 intermediate-risk patients included in the placebo group became delirious (relative risk 0.13, CI 0.03–0.53). Severity of delirium according to the highest value of the DRSR-98 during an episode with delirium in patients in the FICB prophylaxis group was on average 14.34, versus 18.61 in the placebo group (mean difference 4.27, 95% CI 1.8–5.64, P < 0.001). Mean duration of delirium in the FICB prophylaxis group was significantly shorter than in the placebo group (FICB 5.22 days versus placebo 10.97 days, 95% CI 3.87–7.62, P < 0.001). Conclusion No significant difference was found among high-risk patients between FICB prophylaxis and placebo groups in terms of delirium incidence. However, FICB prophylaxis significantly prevented delirium occurrence in intermediate-risk patients. Thus FICB prophylaxis could be beneficial, particularly for intermediate-risk patients.