Background: Hip fractures are commonly experienced by the elderly, and their impact has increased as society has aged. The symptoms of hip fractures (e.g., severe pain and limited daily functions) are thought to cause acute stress to patients; however, the association between fractures and affective disorders is not fully understood. Aim: This nationwide population-based study aimed to analyze the risk of affective disorders in patients diagnosed with a hip fracture. Methods: We used data from the Taiwan Longitudinal Health Insurance Database. Patients who had a history of hip fracture and affective disorders prior to the study period were excluded. A total of 3865 patients who came to emergency departments for treatment of hip fractures between 2004 and 2009 were compared to 11,595 matched control individuals (without hip fracture). Each patient was followed for 1 year to identify episodes of affective disorders. Cox proportional hazards models, adjusted for residence and sociodemographic characteristics, were used to compare the risk of affective disorders in the study and control groups, and affective disorder-free survival curves were generated. Results: A total of 53 (1.4%) patients with hip fractures and 32 (0.3%) controls experienced incident affective disorders during the follow-up period. The stratified Cox proportional analysis indicated that the crude hazard ratio comparing the risk of affective disorders in patients with a hip fracture and in controls was 5.1 (95% confidence interval, 3.27e7.86). Most affective disorders (20.8%) presented during the first 60 days following the fracture. Conclusion: Individuals who experience a hip fracture are at a higher risk of developing affective disorders, and these disorders primarily occur during the first 60 days after the fracture.