A device for fixing a femur for hip endoprosthesis surgery is disclosed. The device has a femur support including a hook configured to support the femur in a region of the femur between a greater trochanter and a lesser trochanter, and a shaft connected to the hook. A lever arm includes a column and a cantilever, wherein the femur support is disposed on the cantilever. An adjustment device is attached to an operating table. A holder is configured to couple the column of the lever arm to the adjustment device. The adjustment device has a drive motor for rotating the holder about an axis of rotation perpendicular to an adjustment plane to move the column in the adjustment plane. The adjustment plane is perpendicular to a support surface of the operating table and parallel to a longitudinal axis of the operating table.