The present study estimates the effect of rivaroxaban on preventing deep vein thrombosis (DVT) in aged diabetics with femoral neck fractures after hip replacement. Our study consisted of 236 aged diabetics with femoral neck fractures, which were divided into the rivaroxaban and control groups. Reaction time (R time), clot formation time (K time), α angle (α), maximum amplitude (MA), clot elasticity (G) and coagulation index (CI), prothrombin time (PT) and activated partial thromboplastin time (APTT) were measured. DVT was diagnosed by color duplex Doppler ultrasound (CDDU). The risk factors of DVT were analysed by logistic regression analysis. Compared with the control group, in the rivaroxaban group, R time and K time were extended and α, MA and G decreased 1 day before operation. One day after operation, the rivaroxaban group had less PT and APPT and lower incidence of DVT than the control group. In the two groups, preoperative and postoperative PT and APPT significantly differed. Body mass index (BMI) ≥25, abnormal coagulation indicators, use of cemented femoral hip prosthesis, high haemoglobin content and non-ankle pump exercise after operation were the risk factors for DVT. Rivaroxaban could prevent DVT in aged diabetics with femoral neck fractures after hip replacement.